Linux 点文件中的“rc”是什么意思

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11030552/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 06:50:51  来源:igfitidea点击:

What does "rc" mean in dot files

linuxrc

提问by bessarabov

In my home folder in Linux I have several config files that have "rc" as a file name extension:

在 Linux 的主文件夹中,我有几个以“rc”作为文件扩展名的配置文件:

$ ls -a ~/|pcregrep 'rc$'
.bashrc
.octaverc
.perltidyrc
.screenrc
.vimrc

What does the "rc" in these names mean?

这些名称中的“rc”是什么意思?

采纳答案by Ribtoks

It looks like one of the following:

它看起来像以下之一:

  • run commands
  • resource control
  • run control
  • runtime configuration
  • 运行命令
  • 资源控制
  • 运行控制
  • 运行时配置


Also I've found a citation:

我也找到了一个引文

The ‘rc' suffix goes back to Unix's grandparent, CTSS. It had a command-script feature called "runcom". Early Unixes used ‘rc' for the name of the operating system's boot script, as a tribute to CTSS runcom.

'rc' 后缀可以追溯到 Unix 的祖父 CTSS。它有一个名为“runco​​m”的命令脚本功能。早期的 Unix 使用 'rc' 作为操作系统启动脚本的名称,作为对 CTSS runco​​m 的致敬。

回答by Prometheus

Runtime Configuration normally if it's in the configdirectory. I think of them as resource files. If you see rcin file name this could be version i.e. Release Candidate.

运行时配置正常,如果它在config目录中。我认为它们是资源文件。如果您rc在文件名中看到,这可能是版本,即 Release Candidate。

Edit: No, I take it back officially... "run commands"

编辑:不,我正式收回它......“运行命令”

[Unix: from runcom files on the CTSS system 1962-63, via the startup script /etc/rc]

Script file containing startup instructions for an application program (or an entire operating system), usually a text file containing commands of the sort that might have been invoked manually once the system was running but are to be executed automatically each time the system starts up.

Thus, it would seem that the "rc" part stands for "runcom", which I believe can be expanded to "run commands". In fact, this is exactly what the file contains, commands that bash should run.

[Unix:来自 CTSS 系统 1962-63 上的 runco​​m 文件,通过启动脚本 /etc/rc]

包含应用程序(或整个操作系统)的启动指令的脚本文件,通常是一个文本文件,其中包含可能在系统运行后手动调用但每次系统启动时自动执行的命令。

因此,“rc”部分似乎代表“runco​​m”,我相信它可以扩展为“运行命令”。事实上,这正是文件包含的内容,bash 应该运行的命令。

Quotedfrom What does “rc” in .bashrc stand for?

引用.bashrc 中的“rc”代表什么?

I learnt something new! :)

我学到了新东西!:)

回答by Justin Scott

To understand rc files, it helps to know that Ubuntu boots into several different runlevels.They are 0-6, 0 being "halt", 1 being "single-user", 2 being "multi-user"(the default runlevel), etc. This system has now been outdated by the Upstartand initdprograms in most Linux Distros. It is still maintained for backwards compatibility.

要理解 rc 文件,了解 Ubuntu 启动到几个不同的运行级别会很有帮助。它们是 0-6,0 表示“停止”,1 表示“单用户”,2 表示“多用户”(默认运行级别),等等。这个系统现在已经被大多数 Linux 中的Upstartinitd程序过时了发行版。它仍然保持向后兼容性。

Within the /etcdirectory are several folders labeled "rc0.d, rc1.d" etc, through rc6.d. These are the directories the kernel refers to to know which initscripts it should run for that runlevel. They are symbolic links to the system service scripts residing in the /etc/init.ddirectory.

在该/etc目录中标记几个文件夹“rc0.d,rc1.d”等,通过rc6.d. 这些是内核引用的目录,知道它应该为该运行级别运行哪些init脚本。它们是指向驻留在/etc/init.d目录中的系统服务脚本的符号链接。

In the context you are using it, it would appear that you are listing any files with rc in the name. The code in these files will set the way the services/tasks startup and run when initialized.

在您使用它的上下文中,您似乎在列出名称中带有 rc 的任何文件。这些文件中的代码将设置服务/任务在初始化时启动和运行的方式。

回答by u7083585

In Unix world, RC stands for "Run Control".

在 Unix 世界中,RC 代表“运行控制”。

http://www.catb.org/~esr/writings/taoup/html/ch10s03.html

http://www.catb.org/~esr/writings/taoup/html/ch10s03.html

回答by Nelssen

In the context of Unix-like systems, the term rc stands for the phrase "run commands". It is used for any file that contains startup information for a command. It is believed to have originated somewhere in 1965 from a runcom facility from the MIT Compatible Time-Sharing System (CTSS).

在类 Unix 系统的上下文中,术语rc 代表短语“运行命令”。它用于包含命令启动信息的任何文件。据信,它起源于 1965 年的某个地方,来自麻省理工学院兼容分时系统 (CTSS) 的一个 runco​​m 设施。

Reference: https://en.wikipedia.org/wiki/Run_commands

参考:https: //en.wikipedia.org/wiki/Run_commands