?? article.ps
字號:
(cause the shell to change its prompt when running as root after an)72183.6 R/F2 10/Times-Italic@0 SF(su)2.507 E F0 5.007(.B)C .007(efore printing each primary prompt,)-5.007 F .305(Bash e)72 195.6 R.305(xpands the v)-.15 F(ariable)-.25 E F1($PR)2.805 E(OMPT_COMMAND)-.3E F0 .305(and, if it has a v)2.805 F .306(alue, e)-.25 F -.15(xe)-.15 G.306(cutes the e).15 F .306(xpanded v)-.15 F .306(alue as)-.25 F 3.735(ac)72 207.6 S 1.235(ommand, allo)-3.735 F 1.234(wing additional prompt customization.)-.25 F -.15(Fo)6.234 G 3.734(re).15 G 1.234(xample, this assignment causes the current)-3.884 F(user)72219.6 Q 2.917(,t)-.4 G .417(he current host, the time, the last component of the current w)-2.917 F.417(orking directory)-.1 F 2.917(,t)-.65 G .418(he le)-2.917 F -.15(ve)-.25 G 2.918(lo).15 G 2.918(fs)-2.918 G .418(hell nest-)-2.918 F(ing, a\nd the history number of the current command to be embedded into the pr\imary prompt:)72 231.6 Q/F3 10/Courier@0 SF 6($P)97 249.6 S(S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')-6 E(chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 261.6 Q(chet@odin [21:03:54] src\(2:637\)$)97 273.6 Q F0 .146(The string being\ assigned is surrounded by single quotes so that if it is e)72 295.2 R.146(xported, the v)-.15 F .146(alue of)-.25 F F1($SHL)2.646 E(VL)-.92 EF0(will)2.646 E(be updated by a child shell:)72 307.2 Q F3(chet@odin [21:17:35] src\(2:638\)$ export PS1)97 325.2 Q(chet@odin [21:17:40] src\(2:639\)$ bash)97 337.2 Q(chet@odin [21:17:46] src\(3:696\)$)97 349.2 Q F0(The \\$ escape is displayed as \231)72 370.8 Q F1($)A F0 2.5<9a77>C(hen running as a normal user)-2.5 E 2.5(,b)-.4 G(ut as \231)-2.7 E F1(#)A F0 2.5<9a77>C(hen running as root.)-2.5 E F1 2.5(4.9. File)72 394.8R(System V)2.5 E(iews)-.37 E F0 .029(Since Berk)97 410.4 R(ele)-.1 E2.529(yi)-.15 G .029(ntroduced symbolic links in 4.2 BSD, one of their most anno)-2.529 F.03(ying properties has been)-.1 F .764(the \231w)72 422.4 R .764(arping\232 to a completely dif)-.1 F .764(ferent area of the \214le system when using)-.25 F F1(cd)3.263 E F03.263(,a)C .763(nd the resultant non-intu-)-3.263 F(iti)72 434.4 Q .704-.15(ve b)-.25 H(eha).15 E .405(vior of \231)-.2 F F1 .405(cd ..)B F02.905(\232. The)B/F4 9/Times-Roman@0 SF(UNIX)2.905 E F0 -.1(ke)2.905 G.405(rnel treats symbolic links).1 F F2(physically)2.905 E F0 5.405(.W)C.405(hen the k)-5.405 F .405(ernel is translating)-.1 F 3.223(ap)72446.4 S .723(athname in which one component is a symbolic link, it repl\aces all or part of the pathname while pro-)-3.223 F .668(cessing the link.)72 458.4 R .668(If the contents of the symbolic link be)5.668 F .669(gin with a slash, the k)-.15 F .669(ernel replaces the pathname)-.1 F.219(entirely; if not, the link contents replace the current component.)72 470.4 R .219(In either case, the symbolic link is visible.)5.219 F.058(If the link v)72 482.4 R .058(alue is an absolute pathname, the us\er \214nds himself in a completely dif)-.25 F .059(ferent part of the \214le sys-)-.25 F(tem.)72 494.4 Q .704(Bash pro)97510 R .704(vides a)-.15 F F2(lo)3.203 E(gical)-.1 E F0(vie)3.203 E 3.203(wo)-.25 G 3.203(ft)-3.203 G .703(he \214le system.)-3.203 F .703(In this def)5.703 F .703(ault mode, command and \214lename com-)-.1 F.522(pletion and b)72 522 R .522(uiltin commands such as)-.2 F F1(cd)3.022 E F0(and)3.022 E F1(pushd)3.022 E F0 .522(which change the current w)3.022 F .522(orking directory transpar)-.1 F(-)-.2 E .127(ently follo)72 534 R 2.627(ws)-.25 G .127(ymbolic links as if the)-2.627 F 2.627(yw)-.15 G .127(ere directories.)-2.627 F(The)5.126 E F1($PWD)2.626 E F0 -.25(va)2.626 G .126(riable, which holds the shell').25 F 2.626(si)-.55 G .126(dea of)-2.626F .366(the current w)72 546 R .366(orking directory)-.1 F 2.866(,d)-.65G .367(epends on the path used to reach the directory rather than its ph)-2.866 F .367(ysical loca-)-.05 F(tion in the local \214le system hierarch)72 558 Q 3.8 -.65(y. F)-.05 H(or e).5 E(xample:)-.15 E F3 6($c)97 576 S 6(d/)-6 G(usr/local/bin)-6 E6($e)97 588 S(cho $PWD)-6 E(/usr/local/bin)97 600 Q 6($p)97 612 S(wd)-6E(/usr/local/bin)97 624 Q 6($/)97 636 S(bin/pwd)-6 E(/net/share/sun4/local/bin)97 648 Q 6($c)97 660 S 6(d.)-6 G(.)-6 E 6($p)97 672 S(wd)-6 E(/usr/local)97 684 Q 6($/)97 696 S(bin/pwd)-6 E(/net/share/sun4/local)97 708 Q 6($c)97 720 S 6(d.)-6 G(.)-6 E EP%%Page: 8 8%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF(-8-)282.17 48 Q/F1 10/Courier@0 SF 6($p)97 84 S(wd)-6 E(/usr)97 96 Q 6($/)97 108 S(bin/pwd)-6 E(/usr)97 120 Q F0 .3(On\e problem with this, of course, arises when programs that do not unders\tand the shell')72 141.6 R 2.8(sl)-.55 G .3(ogical notion of)-2.8 F .217(the \214le system interpret \231..)72 153.6 R 2.718<9a64>-.7 G(if)-2.718 E(ferently)-.25 E 5.218(.T)-.65 G .218(his generally happens when Bash completes \214lenames containing)-5.218F(\231..)72 165.6 Q 3.384<9a61>-.7 G .884(ccording to a logical hierarch)-3.384 F 3.384(yw)-.05 G .884(hich does not correspond to their ph)-3.384 F .883(ysical location.)-.05 F -.15(Fo)5.883 G 3.383(ru).15 G .883(sers who)-3.383 F(\214nd this troublesome, a corresponding)72 177.6 Q/F2 10/Times-Italic@0 SF(physical)2.5 E F0(vie)2.5 E 2.5(wo)-.25 G 2.5(ft)-2.5G(he \214le system is a)-2.5 E -.25(va)-.2 G(ilable:).25 E F1 6($c)97195.6 S 6(d/)-6 G(usr/local/bin)-6 E 6($p)97 207.6 S(wd)-6 E(/usr/local/bin)97 219.6 Q 6($s)97 231.6 S(et -o physical)-6 E 6($p)97243.6 S(wd)-6 E(/net/share/sun4/local/bin)97 255.6 Q/F3 10/Times-Bold@0SF 2.5(4.10. Inter)72 285.6 R(nationalization)-.15 E F0 .145(One of the most signi\214cant impro)97 301.2 R -.15(ve)-.15 G .145(ments in v).15 F .145(ersion 1.13 of Bash w)-.15 F .145(as the change to \231eight-bit clean-)-.1 F 2.933(liness\232. Pre)72313.2 R .433(vious v)-.25 F .432(ersions used the eighth bit of characters to mark whether or not the)-.15 F 2.932(yw)-.15 G .432(ere quoted when)-2.932 F 1.495(performing w)72 325.2 R 1.495(ord e)-.1 F 3.995(xpansions. While)-.15 F 1.495(this did not af)3.995 F 1.496(fect the majority of users, most of whom used only)-.25 F(se)72 337.2 Q-.15(ve)-.25 G 1.236(n-bit ASCII characters, some found it con\214ning.).15 F(Be)6.236 E 1.236(ginning with v)-.15 F 1.236(ersion 1.13, Bash implemented a)-.15 F(dif)72 349.2 Q .02(ferent quoti\ng mechanism that did not alter the eighth bit of characters.)-.25 F.021(This allo)5.021 F .021(wed Bash to manipulate)-.25 F .427(\214les with \231odd\232 characters in their names, b)72 361.2 R .427(ut did nothing to help users enter those names, so v)-.2 F .426(ersion 1.13)-.15 F 1.458(introduced changes to readline that made it eight-bit clean as well.)72373.2 R 1.458(Options e)6.458 F 1.458(xist that force readline to)-.15 F.744(attach no special signi\214cance to characters with the eighth bit\ set \(the def)72 385.2 R .744(ault beha)-.1 F .744(vior is to con)-.2 F-.15(ve)-.4 G .744(rt these).15 F .641(characters to meta-pre\214x)72397.2 R .641(ed k)-.15 F .941 -.15(ey s)-.1 H .642(equences\) and to output these characters without con).15 F -.15(ve)-.4G .642(rsion to meta-pre-).15 F<8c78>72 409.2 Q .008(ed sequences.)-.15F .007(These changes, along with the e)5.007 F .007(xpansion of k)-.15 F-.15(ey)-.1 G .007(maps to a full eight bits, enable readline to).15 F-.1(wo)72 421.2 S(rk with most of the ISO-8859 f).1 E(amily of character sets, used by man)-.1 E 2.5(yE)-.15 G(uropean countries.)-2.5 E F3 2.5(4.11. POSIX)72 445.2 R(Mode)2.5 E F0.584(Although Bash is intended to be POSIX.2 conformant, there are area\s in which the def)97 460.8 R .584(ault beha)-.1 F(vior)-.2 E .463(is not compatible with the standard.)72 472.8 R -.15(Fo)5.463 G 2.962(ru).15 G .462(sers who wish to operate in a strict POSIX.2 en)-2.962 F.462(vironment, Bash)-.4 F .505(implements a)72 484.8 R F2 .505(POSIX mode)3.005 F F0 5.505(.W)C .505(hen this mode is acti)-5.505 F-.15(ve)-.25 G 3.005(,B).15 G .505(ash modi\214es its def)-3.005 F .505(ault operation where it dif)-.1 F(fers)-.25 E .267(from POSIX.2 to match the standard.)72 496.8 R .266(POSIX mode is entered when Bash is started with the)5.267 F F3(-posix)2.766 E F0(option.)2.766 E .149(This feature is also a)72 508.8 R -.25(va)-.2 G .149(ilable as an option to the).25 F F3(set)2.649 E F0 -.2(bu)2.649 G(iltin,).2 E F3 .149(set -o posix)2.649 F F0 5.149(.F)C .149(or compatibility with other GNU)-5.299 F(softw)72 520.8 Q 4.02(are tha\t attempts to be POSIX.2 compliant, Bash also enters POSIX mode if the \v)-.1 F(ariable)-.25 E F3($POSIXL)72 532.8 Q(Y_CORRECT)-.92 E F0 5.824(is set when Bash is started or assigned a v)8.324 F 5.825(alue during e)-.25 F -.15(xe)-.15 G(cution.).15 E F3($POSIX_PED)72544.8 Q(ANTIC)-.35 E F0 .27(is accepted as well, to be compatible with some older GNU utilities.)2.77 F .27(When Bash is)5.27 F .506(started in POSIX mode, for e)72556.8 R .506(xample, it sources the \214le named by the v)-.15 F .507(alue of)-.25 F F3($ENV)3.007 E F0 .507(rather than the \231nor)3.007 F(-)-.2 E(mal\232 startup \214les, and does not allo)72 568.8 Q 2.5(wr)-.25 G(eserv)-2.5 E(ed w)-.15 E(ords to be aliased.)-.1 E F3 2.5(5. New)72 592.8 R -.25(Fe)2.5 G(atur).25 E(es and Futur)-.18 E 2.5(eP)-.18 G(lans)-2.5 E F0 1.632(There are se)97 608.4 R -.15(ve)-.25 G 1.632(ral features introduced in the current v).15 F 1.631(ersion of Bash, v)-.15 F 1.631(ersion 1.14, and a number)-.15 F .241(under consideration for future releases.)72 620.4 R .242(This section will brie\215y detail the ne)5.242 F 2.742(wf)-.25 G .242(eatures in v)-2.742 F .242(ersion 1.14 and)-.15 F(describe se)72 632.4Q -.15(ve)-.25 G(ral features that may appear in later v).15 E(ersions.)-.15 E F3 2.5(5.1. New)72 656.4 R -.25(Fe)2.5 G(atur).25 E(es in Bash-1.14)-.18 E F0 .884(The ne)97 672 R 3.384(wf)-.25 G .884(eatures a)-3.384 F -.25(va)-.2 G .884(ilable in Bash-1.14 answer se).25F -.15(ve)-.25 G .883(ral of the most common requests for enhance-).15 F2.931(ments. Most)72 684 R(notably)2.931 E 2.931(,t)-.65 G .432(here is\ a mechanism for including non-visible character sequences in prompts, \such)-2.931 F .136(as those which cause a terminal to print characters in dif)72 696 R.135(ferent colors or in standout mode.)-.25 F .135(There w)5.135 F .135(as noth-)-.1 F .558(ing pre)72 708 R -.15(ve)-.25 G .558(nting the use of these sequences in earlier v).15 F .559(ersions, b)-.15 F .559(ut the readline redisplay algorithm assumed)-.2 F(each character occupied ph)72 720 Q(ysical screen space and w)-.05 E(ould wrap lines prematurely)-.1 E(.)-.65 E EP%%Page: 9 9%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF(-9-)282.17 48 Q .13(Readline has a fe)97 84 R2.63(wn)-.25 G .63 -.25(ew va)-2.63 H .13(riables, se).25 F -.15(ve)-.25G .13(ral ne).15 F 2.63(wb)-.25 G .13(indable commands, and some additional emacs mode)-2.63 F(def)72 96 Q.918(ault k)-.1 F 1.218 -.15(ey b)-.1 H 3.418(indings. A).15 F(ne)3.418E 3.418(wh)-.25 G .919(istory search mode has been implemented: in this\ mode, readline searches)-3.418 F .336(the history for lines be)72 108 R.336(ginning with the characters between the be)-.15 F .336(ginning of the current line and the cursor)-.15 F(.)-.55 E .555(The e)72 120 R .556(xisting readline incremental search commands no longer ma\tch identical lines more than once.)-.15 F(File-)5.556 E 1.979(name completion no)72 132 R 4.479(we)-.25 G 1.979(xpands v)-4.629 F1.979(ariables in directory names.)-.25 F 1.978(The history e)6.978 F1.978(xpansion f)-.15 F 1.978(acilities are no)-.1 F(w)-.25 E 1.449(nearly completely csh-compatible: missing modi\214ers ha)72 144 R 1.749-.15(ve b)-.2 H 1.449(een added and history substitution has been).15 F-.15(ex)72 156 S(tended.).15 E(Se)97 171.6 Q -.15(ve)-.25 G .474(ral of the features described earlier).15 F 2.973(,s)-.4 G .473(uch as)-2.973 F/F1 10/Times-Bold@0 SF .473(set -o posix)2.973 F F0(and)2.973 EF1($POSIX_PED)2.973 E(ANTIC)-.35 E F0 2.973(,a)C .473(re ne)-2.973 F2.973(wi)-.25 G(n)-2.973 E -.15(ve)72 183.6 S .106(rsion 1.14.).15 F.106(There is a ne)5.106 F 2.606(ws)-.25 G .106(hell v)-2.606 F(ariable,)-.25 E F1(OSTYPE)2.606 E F0 2.606(,t)C 2.606(ow)-2.606 G .106(hich Bash assigns a v)-2.606 F .106(alue that identi\214es the v)-.25 F(er)-.15 E(-)-.2 E 1.38(sion of)72 195.6 R/F2 9/Times-Roman@0 SF(UNIX)3.88 E F0(it')3.88 E 3.879(sr)-.55 G 1.379(unning on \(great for puttin\g architecture-speci\214c binary directories into the)-3.879 F F1($P)3.879 E -.95(AT)-.74 G(H).95 E F0(\).)A -1 -.8(Tw o)72 207.6 T -.25(va)6.215 G 2.915(riables ha).25 F 3.215 -.15(ve b)-.2 H 2.915(een renamed:).15 F F1($HISTCONTR)5.416 E(OL)-.3 E F0(replaces)5.416 E F1($history_contr)5.416 E(ol)-.18 E F0 5.416(,a)C(nd)-5.416 E F1($HOSTFILE)5.416 E F0(replaces)72 219.6 Q F1($hostname_completion_\214le)2.521 E F0 5.021(.I)C 2.521(nb)-5.021 G.021(oth cases, the old names are accepted for backw)-2.521 F .02(ards compatibil-)-.1 F(ity)72 231.6 Q 5.788(.T)-.65 G .788(he ksh)-5.788 F/F3 10/Times-Italic@0 SF(select)3.288 E F0 .788(construct, which allo)3.288 F .788(ws the generation of simple menus, has been implemented.)-.25 F(Ne)5.788 E(w)-.25 E 1.496(capabilities ha)72 243.6 R 1.796 -.15(ve b)-.2 H1.496(een added to e).15 F 1.495(xisting v)-.15 F(ariables:)-.25 E F1($auto_r)3.995 E(esume)-.18 E F0 1.495(can no)3.995 F 3.995(wt)-.25 G(ak)-3.995 E 3.995(ev)-.1 G 1.495(alues of)-4.245 F F3 -.2(ex)3.995 G(act).2 E F0(or)3.995 E F3(sub-)3.995 E(string)72 255.6 Q F0 4.843(,a)C(nd)-4.843 E F1($HISTCONTR)4.843 E(OL)-.3 E F0 2.343(understands the v)4.843 F(alue)-.25 E F3(ignor)4.844 E(eboth)-.37 E F0 4.844(,w)C 2.344(hich combines the tw)-4.844 F 4.844(op)-.1 G(re)-4.844 E(viously)-.25 E1.556(acceptable v)72 267.6 R 4.056(alues. The)-.25 F F1(dirs)4.056 E F0-.2(bu)4.056 G 1.556(iltin has acquired options to print out speci\214c\ members of the directory).2 F 3.062(stack. The)72 279.6 R F1($nolinks)3.062 E F0 -.25(va)3.062 G .562(riable, which forces a ph).25 F .562(ysical vie)-.05 F 3.062(wo)-.25 G 3.062(ft)-3.062 G .563(he \214le system, has been superseded by the)-3.062 F F1<ad50>72 291.6Q F0 .494(option to the)2.994 F F1(set)2.994 E F0 -.2(bu)2.994 G .494(iltin \(equi).2 F -.25(va)-.25 G .494(lent to).25 F F1 .494(set -o ph)2.994 F(ysical)-.15 E F0 .493(\); the v)B .493(ariable is retained for backw)-.25 F .493(ards compati-)-.1 F(bility)72303.6 Q 5.196(.T)-.65 G .196(he v)-5.196 F .196(ersion string contained in)-.15 F F1
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -