您好,登錄后才能下訂單哦!
本篇內(nèi)容主要講解“l(fā)inux rc的含義是什么”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“l(fā)inux rc的含義是什么”吧!
linux rc是runcom的縮寫(xiě),也是“.cshrc”或“/etc/rc”中出現(xiàn)的rc;rc來(lái)源于runcom,首次出現(xiàn)于1965年的MIT CTSS系統(tǒng);在某些場(chǎng)景中,會(huì)執(zhí)行被存儲(chǔ)在文件中的多條命令commands,我們稱(chēng)之為runcom,即運(yùn)行命令run commands的簡(jiǎn)稱(chēng)。
Linux rc 含義全稱(chēng)
這要從Unix系統(tǒng)的史前時(shí)代(1961-1969)開(kāi)始講起,在一開(kāi)始由MIT為主力開(kāi)發(fā)過(guò)一個(gè)兼容分時(shí)系統(tǒng)(Compatible Time-Sharing System),簡(jiǎn)稱(chēng)CTSS。
(這個(gè)CTSS他功能雖然比不了后來(lái)的Unix系統(tǒng),但是人家輩分大,年代早。)
CTSS系統(tǒng)中有一個(gè)關(guān)于命令腳本的特性叫做runcom
。
為了致敬這個(gè)古早版本Unix系統(tǒng)——CTSS的runcom特性,后來(lái)的Unix系統(tǒng)中就用rc
作為操作系統(tǒng)的啟動(dòng)文件名。
Tips
程序語(yǔ)言里的Date是從1970-01-01開(kāi)始的,
而前面提到的Unix的史前時(shí)代(1961-1969)還在1970年之前。
也可以側(cè)面感受到CTSS這個(gè)系統(tǒng)的“輩分”之大。
rc
= RunCom
“rc” 是取自 “runcom”, 來(lái)自麻省理工學(xué)院在 1965 年發(fā)展的 CTSS系統(tǒng)。相關(guān)文獻(xiàn)曾記載這一段話:“具有從檔案中取出一系列命令來(lái)執(zhí)行的功能;這稱(chēng)為 run commands
又稱(chēng)為 “runcom”,而這種檔案又稱(chēng)為一個(gè) runcom (a runcom)?!?/p>
.bashrc
bash的運(yùn)行命令
.vimrc
vim的運(yùn)行命令
.npmrc
npm的運(yùn)行命令
Linux中,文件名以.
開(kāi)頭表示為隱藏文件。
leung@wuyujin ~ % ls -al | grep rc$
-rw------- 1 leung staff 33 5 13 20:34 .npmrc
-rw-r--r-- 1 leung staff 116 5 13 21:20 .yarnrc
-rw-r--r-- 1 leung staff 55 6 2 20:00 .zshrc
What does rc mean in bashr, zshrc, vimrc etc?
翻譯如下:
對(duì)于rc
所代表的意思,你可能會(huì)看到以下幾種:
run commands(運(yùn)行命令)
resource control(資源控制)
run control(運(yùn)行控制)
runtime configuration(運(yùn)行時(shí)配置)
在讀過(guò)這份文檔之后,我更愿意認(rèn)為rc
是runcom
的縮寫(xiě)。
rc = RunCom
就是.cshrc
或/etc/rc
中出現(xiàn)的那個(gè)rc
rc
來(lái)源于runcom
,首次出現(xiàn)于1965年的MIT CTSS系統(tǒng)。
在某些場(chǎng)景中,(我們)會(huì)執(zhí)行被存儲(chǔ)在文件中的多條命令commands
,我們稱(chēng)之為runcom
即運(yùn)行命令run commands
的簡(jiǎn)稱(chēng)。
另外,這個(gè)用于存儲(chǔ)命令的文件被稱(chēng)作:a runcom
。
Unix文件命名中的rc
就是來(lái)自于這樣的老典故。
— Brian Kernighan & Dennis Ritchie, as told to Vicki Brown
Also ESR states that in Run-Control Files:
當(dāng)然,你也可以在 Run-Control
文件中找到證據(jù):rc
后綴一直往前追溯,會(huì)發(fā)現(xiàn)其實(shí)它在Unix的爺爺輩老系統(tǒng)——CTSS里就有了。
而在CTSS這個(gè)古早的系統(tǒng)中有一個(gè)命令腳本的特性叫做:runcom
。
于是早期Unix就開(kāi)始使用rc
作為操作系統(tǒng)啟動(dòng)腳本的文件名,以此來(lái)追憶/致敬 CTSS runcom。
所以我認(rèn)為:rc
是runcom
的縮寫(xiě)。
Unix系統(tǒng)的背景
1961-1969:史前時(shí)代
CTSS(Compatible Time-Sharing System,兼容分時(shí)系統(tǒng)),以MIT為首的開(kāi)發(fā)小組,小而簡(jiǎn)單的實(shí)驗(yàn)室原型。
Multics(Multiplexed Information and Computing System,多路信息與計(jì)算系統(tǒng)),龐大而負(fù)責(zé),不堪重負(fù)。
Unics(Uniplexed information and Computing System,單路信息與計(jì)算系統(tǒng)),返璞歸真,走上正道。
1969-1971:創(chuàng)世紀(jì)
……
1.3) What does {some strange unix command name} stand for?
awk = "Aho Weinberger and Kernighan"
This language was named by its authors, Al Aho, Peter
Weinberger and Brian Kernighan.
grep = "Global Regular Expression Print"
grep comes from the ed command to print all lines matching a
certain pattern
g/re/p
where "re" is a "regular expression".
fgrep = "Fixed GREP".
fgrep searches for fixed strings only. The "f" does not stand
for "fast" - in fact, "fgrep foobar *.c" is usually slower than
"egrep foobar *.c" (Yes, this is kind of surprising. Try it.)
Fgrep still has its uses though, and may be useful when searching
a file for a larger number of strings than egrep can handle.
egrep = "Extended GREP"
egrep uses fancier regular expressions than grep. Many people
use egrep all the time, since it has some more sophisticated
internal algorithms than grep or fgrep, and is usually the
fastest of the three programs.
cat = "CATenate"
catenate is an obscure word meaning "to connect in a series",
which is what the "cat" command does to one or more files. Not
to be confused with C/A/T, the Computer Aided Typesetter.
gecos = "General Electric Comprehensive Operating Supervisor"
When GE's large systems division was sold to Honeywell,
Honeywell dropped the "E" from "GECOS".
Unix's password file has a "pw_gecos" field. The name is a
real holdover from the early days. Dennis Ritchie has reported:
"Sometimes we sent printer output or batch jobs
to the GCOS machine. The gcos field in the password file
was a place to stash the information for the $IDENT card.
Not elegant."
nroff = "New ROFF"
troff = "Typesetter new ROFF"
These are descendants of "roff", which was a re-implementation
of the Multics "runoff" program (a program that you'd use to
"run off" a good copy of a document).
tee = T
From plumbing terminology for a T-shaped pipe splitter.
bss = "Block Started by Symbol"
Dennis Ritchie says:
Actually the acronym (in the sense we took it up; it may
have other credible etymologies) is "Block Started by
Symbol." It was a pseudo-op in FAP (Fortran Assembly [-er?]
Program), an assembler for the IBM 704-709-7090-7094
machines. It defined its label and set aside space for a
given number of words. There was another pseudo-op, BES,
"Block Ended by Symbol" that did the same except that the
label was defined by the last assigned word + 1. (On these
machines Fortran arrays were stored backwards in storage
and were 1-origin.)
The usage is reasonably appropriate, because just as with
standard Unix loaders, the space assigned didn't have to be
punched literally into the object deck but was represented
by a count somewhere.
biff = "BIFF"
This command, which turns on asynchronous mail notification,
was actually named after a dog at Berkeley.
I can confirm the origin of biff, if you're interested.
Biff was Heidi Stettner's dog, back when Heidi (and I, and
Bill Joy) were all grad students at U.C. Berkeley and the
early versions of BSD were being developed. Biff was
popular among the residents of Evans Hall, and was known
for barking at the mailman, hence the name of the command.
Confirmation courtesy of Eric Cooper, Carnegie Mellon University
rc (as in ".cshrc" or "/etc/rc") = "RunCom"
"rc" derives from "runcom", from the MIT CTSS system, ca. 1965.
'There was a facility that would execute a bunch of
commands stored in a file; it was called "runcom" for "run
commands", and the file began to be called "a runcom."
"rc" in Unix is a fossil from that usage.'
Brian Kernighan & Dennis Ritchie, as told to Vicki Brown
"rc" is also the name of the shell from the new Plan 9
operating system.
Perl = "Practical Extraction and Report Language"
Perl = "Pathologically Eclectic Rubbish Lister"
The Perl language is Larry Wall's highly popular
freely-available completely portable text, process, and file
manipulation tool that bridges the gap between shell and C
programming (or between doing it on the command line and
pulling your hair out). For further information, see the
Usenet newsgroup comp.lang.perl.misc.
Don Libes' book "Life with Unix" contains lots more of these
tidbits.
到此,相信大家對(duì)“l(fā)inux rc的含義是什么”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。