在Linux中经常会遇到以rc命名的文件或者文件夹,例如:rc,rc.d,rc0.d ,rc.sysinit,~./bashrc。 rc代表什么呢?
(1)Run-Control
在《The art of Unix programming 》一书的第十章中,rc文件为Run-ControlFiles:
Chapter 10.Configuration
Run-ControlFiles
A run-control file is a file ofdeclarations or commands associated with a program that it interprets on startup. If aprogram has site-specific configuration shared by all users at a site, it willoften have a run control file under the /etc directory. (Some Unixes have an/etc/conf subdirectory that collects such data.)
User-specificconfiguration information is often carried in a hidden run-control file in theuser's home directory. Such files are often called ‘dotfiles’ becausethey exploit the Unix convention that a filename beginning with adot is normally invisible to directory-listing tools.
(2)Run Commands
很多rc文件里给出了rc的定义:
definition: rc file: Script filecontaining startup instructions for an application program (or an entireoperating system), usually a text file containing commands of the sort thatmight have been invoked manually once the system was running but are to beexecuted automatically each time the system starts up.
Source: Linux Guide @FirstLinux /Linux Dictionary V 0.16
http://www.tldp.org/LDP/Linux-Dictionary/html/index.html
Author: Binh Nguyenlinuxfilesystem(at)yahoo(dot)com(dot)au
在TheFreeDictionary:rc file中,说到:
rc file - /R Cfi:l/ [Unix: from the startup script "/etc/rc", but this is commonlybelieved to have been named after older scripts to "runcommands"] Script file containing startup instructions for anapplication program (or an entire operating system), usually a text filecontaining commands of the sort that might have been invoked manually once thesystem was running but are to be executed automatically each time the systemstarts up. See also dot file, profile (sense 1).
(3)Runlevel Changes
在fedora 12的/etc/rc文件中,对RC的定义为:
# rc This file is responsible forstarting/stopping
# services when the runlevelchanges.
总起来说, rc 文件 ( 夹 ) 就是在系统初始化阶段运行的一个配置脚本文件 ( 夹 ) ,一般应以经典著作 《 The artof Unix programming 》一书的 Run-ControlFiles 为准。