Sei sulla pagina 1di 35

The Psychotic Internet Services Unix Bible- A reference for all of us.

A list of commands and a uic! descri"tion


alias ........ this allo#s the user vie# the current aliases a#! ........ this allo#s the user to search for a "attern #ithin a file bdiff ......... com"ares t#o lar$e files bfs .......... scans a lar$e file cal ......... sho#s a calendar cat ......... concatenates and "rints a file cc ......... c com"iler cd ........ chan$es directories ch$rb ......... chan$es a file $rou"s o#nershi" chmod ....... chan$es the "ermission on a file cho#n .......... chan$es the individual o#nershi" of a file cm" ......... com"airs t#o files comm .......... com"ares t#o files so as to determine #hich lines are common to both c" .......... co"ies file to another location cu ......... calls another unix sysytem date .......... returns the date and time df ......... sho#s all mounted drives on your machine diff ......... dis"lays the diference bet#een t#o files du ......... sho#s the dis! usa$e in bloc!s for a directory echo ........ echoes the data to the screen or file ed ........ text editor env ......... lists the current environment variables ex ........ another text editor ex"r ........ evaluates a mathmatical formula find ........ finds a file f%% .......... fortran com"lier format ........ initiali&es a flo""y dis! $re" ......... searches for a "attern #ithin a file hel" ......... $ives hel" !ill ........ sto"s a runnin$ "rocess ln ........ creates a lin! bet#een t#o files l"r ......... co"ies the file to the line "rinter ls ......... lists the files in a directory mail ........ allo#s the user to send'receive mail m!dir .......... ma!es directory more ......... dis"lays a data file to the screen mv ........... used to move or rename files nohu" ........ allo#s a command to continue runnin$ even #hen you lo$ out nroff ......... used to format text "ass#d ........ chan$es your "ass#ord "!$add ......... installs a ne# "ro$ram onto your machine "s ........... (ists the current "rocesses runnin$ "#d ........ dis"lays the name of the #or!in$ directory rm ........ removes files rmdir ........ removes directories set ......... lists all the variables in the current shell setenv ......... sets the environment variables slee" ......... causes a "rocess to become inactive

source ......... allo#s the user to execute a file and u"date any chan$ed values in that file sort .......... sorts files s"ell ......... chec!s for s"ellin$ errors in a file s"lit ........ divides a file stty ......... sets the terminal o"tions tail ......... dis"lays the end of a file tar ......... co"ies all s"ecified files into one touch ........ creates an em"ty file or u"dates the time'date stam" on a file troff ......... out"uts formatted out"ut tset ........ sets the terminal ty"e umas! ......... s"ecify a ne# creation mas! uni ......... com"airs t#o files uuc" ........ unix to unix execute vi ........ full screen editor vi"# ......... o"ens the vi editor as #ell as "ass#ord file for editin$ volchec! ......... chec!s to see if there is a flo""y dis! mounted to your machine #c ......... dis"lays detail in the full si&e #ho ........ inf. on other "eo"le online #rite ......... send a messa$e to another user ) ....... re"eats commands

*ore commands #ith a better descri"tion +,ot all commands are listed-.
cat. -b/ --number-nonblan! ,umber all nonblan! out"ut lines/ startin$ #ith 0. -e 1 uivalent to -v1.

-n/ --number ,umber all out"ut lines/ startin$ #ith 0. -s/ --s uee&e-blan! 2e"lace multi"le ad3acent blan! lines #ith a sin$le blan! line. -t 1 uivalent to -vT. -u I$nored4 for Unix com"atibility.

-v/ --sho#-non"rintin$ 5is"lay control characters exce"t for (65 and TAB usin$ 789 notation and "recede characters that have the hi$h bit set #ith 7*-9. -A/ --sho#-all 1 uivalent to -v1T. -1/ --sho#-ends 5is"lay a 7:9 after the end of each line. -T/ --sho#-tabs 5is"lay TAB characters as 78I9. --hel" Print a usa$e messa$e and exit #ith a status code indicatin$ success.

--version Print version information on standard out"ut then exit. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; cd. directory becomes the ne# #or!in$ directory. The "rocess must have execute +search- "ermission in directory. If cd is used #ithout ar$uments/ it returns you to your lo$in directory. In csh you may s"ecify a list of directories in #hich directory is to be sou$ht as a subdirectory if it is not a subdirectory of the current directory4 see the descri"tion of the cd"ath variable in csh. chmod. The format of a symbolic mode is 7<u$oa...=<<>?=<r#x@stu$o...=...=</...=9. *ulti"le symbolic o"erations can be $iven/ se"arated by commas. A combination of the letters 7u$oa9 controls #hich users9 access to the file #ill be chan$ed. the user #ho o#ns it +u-/ other users in the file9s $rou" +$-/ other users not in the file9s $rou" +o-/ or all users +a-. If none of these are $iven/ the effect is as if 7a9 #ere $iven/ but bits that are set in the umas! are not affected. The o"erator 7>9 causes the "ermissions selected to be added to the existin$ "ermissions of each file4 7-9 causes them to be removed4 and 7?9 causes them to be the only "ermissions that the file has. The letters 7r#x@stu$o9 select the ne# "ermissions for the affected users. read +r-/ #rite +#-/ execute +or access for directories- +x-/ execute only if the file is a directory or already has execute "ermission for some user +@-/ set user or $rou" I5 on execution +s-/ save "ro$ram text on s#a" device +t-/ the "ermissions that the user #ho o#ns the file currently has for it +u-/ the "ermissions that other users in the file9s $rou" have for it +$-/ and the "ermissions that other users not in the file9s $rou" have for it +o-. A numeric mode is from one to four octal di$its +A-%-/ derived by addin$ u" the bits #ith values B/ C/ and 0. Any omitted di$its are assumed to be leadin$ &eros. The first di$it selects the set user I5 +B- and set $rou" I5 +C- and save text ima$e +0- attributes. The second di$it selects "ermissions for the user #ho o#ns the file. read +B-/ #rite +C-/ and execute +0-4 the third selects "ermissions for other users in the file9s $rou"/ #ith the same values4 and the fourth for other users not in the file9s $rou"/ #ith the same values. chmod never chan$es the "ermissions of symbolic lin!s4 the chmod system call cannot chan$e their "ermissions. This is not a "roblem since the "ermissions of symbolic lin!s are never used. Do#ever/ for each symbolic lin! listed on the command line/ chmod chan$es the "ermissions of the "ointedto file. In contrast/ chmod i$nores symbolic lin!s encountered durin$ recursive directory traversals. EPTIE,S -c/ --chan$es Ferbosely describe only files #hose "ermissions actually chan$e. -f/ --silent/ -- uiet 5o not "rint error messa$es about files #hose "ermissions cannot be chan$ed. -v/ --verbose Ferbosely describe chan$ed "ermissions. -2/ --recursive 2ecursively chan$e "ermissions of directories and their contents. --hel" Print a usa$e messa$e on standard out"ut and exit successfully. --version Print version information on standard out"ut then exit successfully. clear. clear clears your screen if this is "ossible. It loo!s in the environment for the terminal ty"e and then

in 'etc'termca" to fi$ure out ho# to clear the screen. date. This manual "a$e documents the G,U version of date. date #ith no ar$uments "rints the current time and date +in the format of the 7Hc9 directive described belo#-. If $iven an ar$ument that starts #ith a 7>9/ it "rints the current time and date in a format controlled by that ar$ument/ #hich has the same format as the format strin$ "assed to the 7strftime9 function. 1xce"t for directives that start #ith 7H9/ characters in that strin$ are "rinted unchan$ed. The directives are. H n a ne#line t a hori&ontal tab a literal H

Time fields. HD hour +AA..CIHI hour +A0..0C-

H! hour + A..CIHl hour + 0..0C-

H* minute +AA..JKH" locale9s A* or P* Hr time/ 0C-hour +hh.mm.ss <AP=*Hs seconds since 0K%A-A0-A0 AA.AA.AA UTL +a nonstandard extensionHS second +AA..M0HT time/ CB-hour +hh.mm.ssH@ locale9s time re"resentation +HD.H*.HSHN time &one +e.$./ 15T-/ or nothin$ if no time &one is determinable 5ate fields. Ha locale9s abbreviated #ee!day name +Sun..Sat-

HA locale9s full #ee!day name/ variable len$th +Sunday..SaturdayHb locale9s abbreviated month name +Oan..5ecHB locale9s full month name/ variable len$th +Oanuary..5ecemberHc locale9s date and time +Sat ,ov AB 0C.AC.II 1ST 0KPKHd day of month +A0..I0H5 date +mm'dd'yyHh same as Hb H3 day of year +AA0..IMMHm month +A0..0CHU #ee! number of year #ith Sunday as first day of #ee! +AA..JIH# day of #ee! +A..M- #ith A corres"ondin$ to Sunday HQ #ee! number of year #ith *onday as first day of #ee! +AA..JIHx locale9s date re"resentation +mm'dd'yyHy last t#o di$its of year +AA..KKHR year +0K%A...By default/ date "ads numeric fields #ith &eroes. G,U date reco$ni&es the follo#in$ nonstandard numeric modifiers. ; +underscore- "ad the field #ith s"aces If $iven an ar$ument that does not start #ith 7>9/ date sets the system cloc! to the time and date s"ecified by that ar$ument. The ar$ument must consist entirely of di$its/ #hich have the follo#in$ meanin$. ** month 55 +hy"hen- do not "ad the field

day #ithin month hh hour mm minute LL first t#o di$its of year +o"tionalRR last t#o di$its of year +o"tionalss second +o"tionalEnly the su"eruser can set the system cloc!. EPTIE,S -d datestr/ --date datestr 5is"lay the time and date s"ecified in datestr/ #hich can be in almost any common format. The dis"lay is in the default out"ut format/ or if an ar$ument startin$ #ith 7>9 is $iven to date/ in the format s"ecified by that ar$ument. --hel" Print a usa$e messa$e on standard out"ut and exit successfully. -s datestr/ --set datestr Set the time and date to datestr/ #hich can be in almost any common format. It can contain month names/ time&ones/ 7am9 and 7"m9/ etc. -u/ --universal Print or set the time and date in Loordinated Universal Time +also !no#n as Green#ich *ean Time- instead of in local +#all cloc!- time. --version Print version information on standard out"ut then exit successfully. find. find recursively descends the directory hierarchy for each "athname in the "athname-list/ see!in$ files that match a lo$ical ex"ression #ritten usin$ the o"erators listed belo#. find does not follo# symbolic lin!s to other files or directories4 it a""lies the selection criteria to the symbolic lin!s themselves/ as if they #ere ordinary files +see ln+0F- for a descri"tion of symbolic lin!s-. If the fast-find feature is enabled/ find dis"lays "athnames in #hich a filename com"onent occurs. USAG1 E"erators In the descri"tions/ the ar$ument n is used as a decimal inte$er #here >n means more than n/ -n means less than n/ and n means exactly n. -fsty"e ty"e True if the filesystem to #hich the file belon$s is of ty"e ty"e/ #here ty"e is ty"ically B.C or nfs. -name filename True if the filename ar$ument matches the current file name. Shell ar$ument syntax can be used if esca"ed +#atch out for </ S and T-.

-"erm onum True if the file "ermission fla$s exactly match the octal number onum +see chmod+0F--. If onum is "refixed by a minus si$n/ more fla$ bits +A0%%%%/ see chmod+0F-- become si$nificant and the fla$s are com"ared. +fla$sUonum-??onum. -"rune Al#ays yields true. Das the side effect of "runin$ the search tree at the file. That is/ if the current "ath name is a directory/ find #ill not descend into that directory. -ty"e c True if the ty"e of the file is c/ #here c is one of. b c for character s"ecial file d f for "lain file " l for symbolic lin! s for soc!et for named "i"e +6I6Efor directory for bloc! s"ecial file c

-lin!s n True if the file has n lin!s. -user uname True if the file belon$s to the user uname. If uname is numeric and does not a""ear as a lo$in name in the 'etc'"ass#d database/ it is ta!en as a user I5. -nouser True if the file belon$s to a user not in the 'etc'"ass#d database. -$rou" $name True if the file belon$s to $rou" $name. If $name is numeric and does not a""ear as a lo$in name in the 'etc'$rou" database/ it is ta!en as a $rou" I5. -no$rou" True if the file belon$s to a $rou" not in the 'etc'$rou" database. -si&e n True if the file is n bloc!s lon$ +J0C bytes "er bloc!-. If n is follo#ed by a c/ the si&e is in characters. -inum n True if the file has inode number n.

-atime n True if the file has been accessed in n days. ,ote. the access time of directories in "ath-name-list is chan$ed by find itself. -mtime n True if the file has been modified in n days. -ctime n True if the file has been chan$ed in n days. VLhan$edV means either that the file has been modified or some attribute of the file +its o#ner/ its $rou"/ the number of lin!s to it/ etc.- has been chan$ed. -exec command True if the executed command returns a &ero value as exit status. The end of command must be "unctuated by an esca"ed semicolon. A command ar$ument WX is re"laced by the current "athname. -o! command (i!e -exec exce"t that the $enerated command is #ritten on the standard out"ut/ then the standard in"ut is read and the command executed only u"on res"onse y. -"rint Al#ays true4 the current "athname is "rinted. -ls Al#ays true4 "rints current "athname to$ether #ith its associated statistics. These include +res"ectively- inode number/ si&e in !ilobytes +0ACB bytes-/ "rotection mode/ number of hard lin!s/ user/ $rou"/ si&e in bytes/ and modification time. If the file is a s"ecial file the si&e field #ill instead contain the ma3or and minor device numbers. If the file is a symbolic lin! the "athname of the lin!ed-to file is "rinted "receded by 7-Y9. The format is identical to that of ls -$ilds +see ls+0F--. ,ote. formattin$ is done internally/ #ithout executin$ the ls "ro$ram. -c"io device Al#ays true4 #rite the current file on device in c"io+J- format +J0CA-byte records-. -nc"io device Al#ays true4 #rite the current file on device in c"io -c format +J0CA-byte records-. -ne#er file True if the current file has been modified more recently than the ar$ument filename. -xdev Al#ays true4 find does not traverse do#n into a file system different from the one on #hich current ar$ument "athname resides. -de"th Al#ays true4 find descends the directory hierarchy/ actin$ on the entries in a directory before actin$ on the directory itself. This can be useful #hen find is used #ith c"io to transfer files that are contained in directories #ithout #rite "ermission. +ex"ressionTrue if the "arenthesi&ed ex"ression is true. ,ote. Parentheses are s"ecial to the shell and must be esca"ed. )"rimary True if the "rimary is false +) is the unary not o"erator-. "rimary0 < -a = "rimaryC

True if both "rimary0 and "rimaryC are true. The -a is not re uired. It is im"lied by the 3uxta"osition of t#o "rimaries. "rimary0 -o "rimaryC True if either "rimary0 or "rimaryC is true +-o is the or o"erator-. 6ast-6ind The fast-find feature is enabled by the "resence of the find.codes database in 'usr'lib'find. Rou must be root to build or u"date this database by runnin$ the u"datedb scri"t in that same directory. Rou may #ish to modify the u"datedb scri"t to suit your needs. An alternate database can be s"ecified by settin$ the 6LE51S environment variable. c". c" co"ies the contents of filename0 onto filenameC. The mode and o#ner of filenameC are "reserved if it already existed4 the mode of the source file is used other#ise. If filename0 is a symbolic lin!/ or a du"licate hard lin!/ the contents of the file that the lin! refers to are co"ied4 lin!s are not "reserved. In the second form/ c" recursively co"ies directory0/ alon$ #ith its contents and subdirectories/ to directoryC. If directoryC does not exist/ c" creates it and du"licates the files and subdirectories of directory0 #ithin it. If direc;toryC does exist/ c" ma!es a co"y of the directory0 directory #ithin directoryC +as a subdirectory-/ alon$ #ith its files and subdirectories. In the third form/ each filename is co"ied to the indicated directory4 the basename of the co"y corres"onds to that of the ori$inal. The destination directory must already exist for the co"y to succeed. c" refuses to co"y a file onto itself. fin$er. By default/ fin$er dis"lays information about each lo$$ed-in user/ includin$ his or her. lo$in name/ full name/ terminal name +"re"ended #ith a 7T9 if #rite-"ermission is denied-/ idle time/ lo$in time/ and location +comment field in 'etc'ttytab for users lo$$ed in locally/ hostname for users lo$$ed in remotely- if !no#n. Idle time is minutes if it is a sin$le inte$er/ hours and minutes if a 7.9 is "resent/ or days and hours if a d is "resent. Qhen one or more name ar$uments are $iven/ more detailed information is $iven for each name s"ecified/ #hether they are lo$$ed in or not. A name may be a first or last name/ or an account name. Information is "resented in a multiline format/ and includes/ in addition to the information mentioned above. the user9s home directory and lo$in shell the time they lo$$ed in if they are currently lo$$ed in/ or the time they last lo$$ed in if they are not/ as #ell as the terminal or host from #hich they lo$$ed in and/ if a terminal/ the comment field in 'etc'ttytab for that terminal the last time they received mail/ and the last time they read their mail any "lan contained in the file ."lan in the user9s home directory and any "ro3ect on #hich they are #or!in$ described in the file ."ro3ect +also in that directoryIf a name ar$ument contains an at-si$n/ 7Z9/ then a connection is attem"ted to the machine named after the at-si$n/ and the remote fin$er daemon is ueried. The data returned by that daemon is "rinted. If a lon$ format "rintout is to be "roduced/ fin$er "asses the -l o"tion to the remote fin$er daemon over the net#or! usin$ the 'Q feature of the "rotocol +see ,A*1'6I,G12 Protocol-. $re". Gre" searches the named in"ut files +or standard in"ut if no files are named/ or the file name - is $iven- for lines containin$ a match to the $iven "attern. By default/ $re" "rints the matchin$ lines. There are three ma3or variants of $re"/ controlled by the follo#in$ o"tions. -G Inter"ret "attern as a basic re$ular ex"ression +see belo#-. This is the default. -1 Inter"ret "attern as an extended re$ular ex"ression +see belo#-.

-6

Inter"ret "attern as a list of fixed strin$s/ se"arated by ne#lines/ any of #hich is to be matched. In addition/ t#o variant "ro$rams e$re" and f$re" are available. 1$re" is similiar +but not identical- to $re" -1/ and is com"atible #ith the historical Unix e$re". 6$re" is the same as $re" -6.

All variants of $re" understand the follo#in$ o"tions. -num *atches #ill be "rinted #ith num lines of leadin$ and trailin$ context. Do#ever/ $re" #ill never "rint any $iven line more than once. -A num Print num lines of trailin$ context after matchin$ lines. -B num Print num lines of leadin$ context before matchin$ lines. -L 1 uivalent to -C. -F Print the version number of $re" to standard error. This version number should be included in all bu$ re"orts +see belo#-. -b Print the byte offset #ithin the in"ut file before each line of out"ut. -c Su""ress normal out"ut4 instead "rint a count of matchin$ lines for each in"ut file. Qith the -v o"tion +see belo#-/ count non-matchin$ lines. -e "attern Use "attern as the "attern4 useful to "rotect "atterns be$innin$ #ith -. -f file Ebtain the "attern from file. Su""ress the "refixin$ of filenames on out"ut #hen multi"le files are searched. -i I$nore case distinctions in both the "attern and the in"ut files. -( Su""ress normal out"ut4 instead "rint the name of each in"ut file from #hich no out"ut #ould normally have been "rinted. -l Su""ress normal out"ut4 instead "rint the name of each in"ut file from #hich out"ut #ould normally have been "rinted. -n Prefix each line of out"ut #ith the line number #ithin its in"ut file. [uiet4 su""ress normal out"ut. -s Su""ress error messa$es about nonexistent or unreadable files. -v Invert the sense of matchin$/ to select non-matchin$ lines. -# Select only those lines containin$ matches that form #hole #ords. The test is that the matchin$ substrin$ must either be at the be$innin$ of the line/ or "receded by a non-#ord constituent character. Similarly/ it must be either at the end of the line or follo#ed by a non-#ord constituent character. Qord-constituent characters are letters/ di$its/ and the underscore. -x Select only those matches that exactly match the #hole line.

-h

!ill. !ill sends the T12* +terminate/ 0J- si$nal to the "rocesses #ith the s"ecified "ids. If a si$nal name or number "receded by 7-9 is $iven as first ar$ument/ that si$nal is sent instead of terminate. The si$nal names are listed by usin$ the -l o"tion/ and are as $iven in \si$nal.hY/ stri""ed of the common SIG "refix. The terminate si$nal #ill !ill "rocesses that do not catch the si$nal/ so 7!ill -K ...9 is a sure !ill/ as the ]I(( +K- si$nal cannot be cau$ht. By convention/ if "rocess number A is s"ecified/ all members in the "rocess $rou" +that is/ "rocesses resultin$ from the current lo$in- are si$naled +but be#are. this #or!s only if you use sh+0-4 not if you use csh+0-.- ,e$ative "rocess numbers also have s"ecial meanin$s4 see !ill+CF- for details. The !illed "rocesses must belon$ to the current user unless he is the su"er-user.

To shut the system do#n and brin$ it u" sin$le user the su"er-user may send the initiali&ation "rocess a T12* +terminate- si$nal by 7!ill 094 see init+P-. To force init to close and o"en terminals accordin$ to #hat is currently in 'etc'ttytab use 7!ill -DUP 09 +sendin$ a han$u" si$nal to "rocess 0-. The shell re"orts the "rocess number of an asynchronous "rocess started #ith 7U9 +run in the bac!$round-. Process numbers can also be found by usin$ "s+0-. !ill is built in to csh+0-4 it allo#s 3ob s"ecifiers/ such as 7!ill H ...9/ in "lace of !ill ar$uments. See csh+0- for details. less. (ess is a "ro$ram similar to more +0-/ but #hich allo#s bac!#ards movement in the file as #ell as for#ard movement. Also/ less does not have to read the entire in"ut file before startin$/ so #ith lar$e in"ut files it starts u" faster than text editors li!e vi +0-. (ess uses termca" +or terminfo on some systems-/ so it can run on a variety of terminals. There is even limited su""ort for hardco"y terminals. +En a hardco"y terminal/ lines #hich should be "rinted at the to" of the screen are "refixed #ith an u"arro#.Lommands are based on both more and vi. Lommands may be "receeded by a decimal number/ called , in the descri"tions belo#. The number is used by some commands/ as indicated. In the follo#in$ descri"tions/ 8@ means control-@. 1SL stands for the 1SLAP1 !ey4 for exam"le 1SL-v means the t#o character se uence V1SLAP1V/ then VvV. D Del". dis"lay a summary of these commands. If you for$et all the other commands/ remember this one. SPAL1 or f or 86 or 8F Scroll for#ard , lines/ default one #indo# +see o"tion -& belo#-. If , is more than the screen si&e/ only the final screenful is dis"layed. Qarnin$. some systems use 8F as a s"ecial literali&ation character. b or 8B or 1SL-v Scroll bac!#ard , lines/ default one #indo# +see o"tion -& belo#-. If , is more than the screen si&e/ only the final screenful is dis"layed. 21TU2, or 8, or e or 81 or 3 or 8O Scroll for#ard , lines/ default 0. The entire , lines are dis"layed/ even if , is more than the screen si&e. y or 8R or 8P or ! or 8] Scroll bac!#ard , lines/ default 0. The entire , lines are dis"layed/ even if , is more than the screen si&e. Qarnin$. some systems use 8R as a s"ecial 3ob control character. d or 85 Scroll for#ard , lines/ default one half of the screen si&e. If , is s"ecified/ it becomes the ne# default for subse uent d and u commands. u or 8U Scroll bac!#ard , lines/ default one half of the screen si&e. If , is s"ecified/ it becomes the ne# default for subse uent d and u commands. r or 82 or 8( 2e"aint the screen. 2 2e"aint the screen/ discardin$ any buffered in"ut. Useful if the file is chan$in$ #hile it is bein$ vie#ed.

$ or \ or 1SL-\ Go to line , in the file/ default 0 +be$innin$ of file-. +Qarnin$. this may be slo# if , is lar$e.G or Y or 1SL-Y Go to line , in the file/ default the end of the file. +Qarnin$. this may be slo# if , is lar$e/ or if , is not s"ecified and standard in"ut/ rather than a file/ is bein$ read." or H Go to a "osition , "ercent into the file. , should be bet#een A and 0AA. +This #or!s if standard in"ut is bein$ read/ but only if less has already read to the end of the file. It is al#ays fast/ but not al#ays useful.m 6ollo#ed by any lo#ercase letter/ mar!s the current "osition #ith that letter. 7 +Sin$le uote.- 6ollo#ed by any lo#ercase letter/ returns to the "osition #hich #as "reviously mar!ed #ith that letter. 6ollo#ed by another sin$le uote/ returns to the "ostion at #hich the last Vlar$eV movement command #as executed. All mar!s are lost #hen a ne# file is examined.

8@8@ Same as sin$le uote. '"attern Search for#ard in the file for the ,-th line containin$ the "attern. , defaults to 0. The "attern is a re$ular ex"ression/ as reco$ni&ed by ed. The search starts at the second line dis"layed +but see the -a o"tion/ #hich chan$es this-. S"attern Search bac!#ard in the file for the ,-th line containin$ the "attern. The search starts at the line immediately before the to" line dis"layed. ')"attern (i!e '/ but the search is for the ,-th line #hich does ,ET contain the "attern. S)"attern (i!e S/ but the search is for the ,-th line #hich does ,ET contain the "attern. n 2e"eat "revious search/ for ,-th line containin$ the last "attern +or ,ET containin$ the last "attern/ if the "revious search #as ') or S)-. 1 <filename= 1xamine a ne# file. If the filename is missin$/ the VcurrentV file +see the , and P commands belo#from the list of files in the command line is re-examined. If the filename is a "ound si$n +^-/ the "reviously examined file is re-examined. 8@8F or .e Same as 1. Qarnin$. some systems use 8F as a s"ecial literali&ation character. , or .n 1xamine the next file +from the list of files $iven in the command line-. If a number , is s"ecified +not to be confused #ith the command ,-/ the ,-th next file is examined. P or ." 1xamine the "revious file. If a number , is s"ecified/ the ,-th "revious file is examined. ? or 8G

Prints some information about the file bein$ vie#ed/ includin$ its name and the line number and byte offset of the bottom line bein$ dis"layed. If "ossible/ it also "rints the len$th of the file and the "ercent of the file above the last dis"layed line. 6ollo#ed by one of the command line o"tion letters +see belo#-/ this #ill chan$e the settin$ of that o"tion and "rint a messa$e describin$ the ne# settin$. If the o"tion letter has a numeric value +such as -b or -h-/ or a strin$ value +such as -P or -t-/ a ne# value may be entered after the o"tion letter. ; +Underscore.- 6ollo#ed by one of the command line o"tion letters +see belo#-/ this #ill "rint a messa$e describin$ the current settin$ of that o"tion. The settin$ of the o"tion is not chan$ed. >cmd Lauses the s"ecified cmd to be executed each time a ne# file is examined. 6or exam"le/ >G causes less to initially dis"lay each file startin$ at the end rather than the be$innin$. F Prints the version number of less bein$ run.

or . or NN 1xits less. The follo#in$ t#o commands may or may not be valid/ de"endin$ on your "articular installation. v Invo!es an editor to edit the current file bein$ vie#ed. The editor is ta!en from the environment variable 15ITE2/ or defaults to VviV.

) shell-command Invo!es a shell to run the shell-command $iven. A "ercent si$n in the command is re"laced by the name of the current file. V))V re"eats the last shell command. V)V #ith no shell command sim"ly invo!es a shell. In all cases/ the shell is ta!en from the environment variable SD1((/ or defaults to VshV. lo$out. Built-in commands are executed #ithin the L shell. If a built-in command occurs as any com"onent of a "i"eline exce"t the last/ it is executed in a subshell. . ,ull command. This command is inter"reted/ but "erforms no action. alias < name < def = = Assi$n def to the alias name. def is a list of #ords that may contain esca"ed historysubstitution metasyntax. name is not allo#ed to be alias or unalias. If def is omitted/ the alias name is dis"layed alon$ #ith its current definition. If both name and def are omitted/ all aliases are dis"layed. b$ <H3ob= ... 2un the current or s"ecified 3obs in the bac!$round. brea! 2esume execution after the end of the nearest enclosin$ foreach or #hile loo". The remainin$ commands on the current line are executed. This allo#s multilevel brea!s to be #ritten as a list of brea! commands/ all on one line. brea!s# Brea! from a s#itch/ resumin$ after the ends#.

case label. A label in a s#itch statement. cd < dir = chdir < dir = Lhan$e the shell9s #or!in$ directory to directory dir. If no ar$ument is $iven/ chan$e to the home directory of the user. If dir is a relative "athname not found in the current directory/ chec! for it in those directories listed in the cd"ath variable. If dir is the name of a shell variable #hose value starts #ith a '/ chan$e to the directory named by that value. continue Lontinue execution of the nearest enclosin$ #hile or foreach. default. (abels the default case in a s#itch statement. The default should come after all case labels. Any remainin$ commands on the command line are first executed. dirs < -l = Print the directory stac!/ most recent to the left4 the first directory sho#n is the current directory. Qith the -l ar$ument/ "roduce an unabbreviated "rintout4 use of the _ notation is su""ressed. echo < -n = list The #ords in list are #ritten to the shell9s standard out"ut/ se"arated by SPAL1 characters. The out"ut is terminated #ith a ,1Q(I,1 unless the -n o"tion is used. eval ar$ument ... 2eads the ar$uments as in"ut to the shell/ and executes the resultin$ command+s-. This is usually used to execute commands $enerated as the result of command or variable substitution/ since "arsin$ occurs before these substitutions. See tset+0- for an exam"le of ho# to use eval. exec command 1xecute command in "lace of the current shell/ #hich terminates. exit < +ex"r- = The shell exits/ either #ith the value of the status variable/ or #ith the value of the s"ecified by the ex"ression ex"r. f$ H < 3ob = Brin$ the current or s"ecified 3ob into the fore$round. foreach var +#ordlist... end The variable var is successively set to each member of #ordlist. The se uence of commands bet#een this command and the matchin$ end is executed for each ne# value of var. +Both foreach and end must a""ear alone on se"arate lines.The built-in command continue may be used to continue the loo" "rematurely and the built-in command brea! to terminate it "rematurely. Qhen this command is read from the terminal/ the loo" is read u" once "rom"tin$ #ith S before any statements in the loo" are executed. $lob #ordlist Perform filename ex"ansion on #ordlist. (i!e echo/ but no ` esca"es are reco$ni&ed. Qords are delimited by null characters in the out"ut. $oto label The s"ecified label is filename and command ex"anded to yield a label. The shell re#inds its in"ut as much as "ossible and searches for a line of the form label. "ossibly "receded by SPAL1 or

TAB characters. 1xecution continues after the indicated line. It is an error to 3um" to a label that occurs bet#een a #hile or for built-in/ and its corres"ondin$ end. hashstat Print a statistics line indicatin$ ho# effective the internal hash table has been at locatin$ commands +and avoidin$ execs-. An exec is attem"ted for each com"onent of the "ath #here the hash function indicates a "ossible hit/ and in each com"onent that does not be$in #ith a 7'9. history < -hr = < n = 5is"lay the history list4 if n is $iven/ dis"lay only the n most recent events. -r 2everse the order of "rintout to be most recent first rather than oldest first. -h 5is"lay the history list #ithout leadin$ numbers. This is used to "roduce files suitable for sourcin$ usin$ the -h o"tion to source. if +ex"r- command If the s"ecified ex"ression evaluates to true/ the sin$le command #ith ar$uments is executed. Fariable substitution on command ha""ens early/ at the same time it does for the rest of the if command. command must be a sim"le command/ not a "i"eline/ a command list/ or a "arenthesi&ed command list. ,ote. I'E redirection occurs even if ex"r is false/ #hen command is not executed +this is a bu$-. if +ex"r- then ... else if +ex"rC- then ... else ... endif If ex"r is true/ commands u" to the first else are executed. Ether#ise/ if ex"rC is true/ the commands bet#een the else if and the second else are executed. Ether#ise/ commands bet#een the else and the endif are executed. Any number of else if "airs are allo#ed/ but only one else. Enly one endif is needed/ but it is re uired. The #ords else and endif must be the first non#hite characters on a line. The if must a""ear alone on its in"ut line or after an else.3obs< -l = (ist the active 3obs under 3ob control. -l (ist "rocess I5s/ in addition to the normal information. !ill < -si$ = < "id = < H3ob = ... !ill -l Send the T12* +terminate- si$nal/ by default/ or the si$nal s"ecified/ to the s"ecified "rocess I5/ the 3ob indicated/ or the current 3ob. Si$nals are either $iven by number or by name. There is no default. Ty"in$ !ill does not send a si$nal to the current 3ob. If the si$nal bein$ sent is T12* +terminate- or DUP +han$u"-/ then the 3ob or "rocess is sent a LE,T +continue- si$nal as #ell. -l (ist the si$nal names that can be sent.

limit < -h = < resource < max-use = = (imit the consum"tion by the current "rocess or any "rocess it s"a#ns/ each not to exceed max-use on the s"ecified resource. If max-use is omitted/ "rint the current limit4 if resource is omitted/ dis"lay all limits. -h Use hard limits instead of the current limits. Dard limits im"ose a ceilin$ on the values of the current limits. Enly the su"er-user may raise the hard limits.

resource is one of. c"utime *aximum LPU seconds "er "rocess. filesi&e (ar$est sin$le file allo#ed. datasi&e *aximum data si&e +includin$ stac!- for the "rocess. stac!si&e *aximum stac! si&e for the "rocess. coredum"si&e *aximum si&e of a core dum" +file-. descri"tors *aximum value for a file descri"tor. max-use is a number/ #ith an o"tional scalin$ factor/ as follo#s. nh Dours +for c"utime-. n! nm n me$abytes or minutes +for c"utime-. mm.ss *inutes and seconds +for c"utime-. lo$in < usernamea-" = Terminate a lo$in shell and invo!e lo$in+0-. The .lo$out file is not "rocessed. If username is omitted/ lo$in "rom"ts for the name of a user. -" Preserve the current environment +variables-. lo$out Terminate a lo$in shell. nice < >na-n = < command = Increment the "rocess "riority value for the shell or for command by n. The hi$her the "riority value/ the lo#er the "riority of a "rocess/ and the slo#er it runs. Qhen $iven/ command is al#ays run in a subshell/ and the restrictions "laced on commands in sim"le if commands a""ly. If command is omitted/ nice increments the value for the current shell. If no increment is s"ecified/ nice sets the nice value to B. The ran$e of nice values is from -CA throu$h 0K. Falues of n outside this ran$e set the value to the lo#er/ or to the hi$her boundary/ res"ectively. >n Increment the "rocess "riority value by n. -n 5ecrement by n. This ar$ument can be used only by the su"er-user. n !ilobytes. This is the default for all but c"utime.

nohu" < command = 2un command #ith DUPs i$nored. Qith no ar$uments/ i$nore DUPs throu$hout the remainder of a

scri"t. Qhen $iven/ command is al#ays run in a subshell/ and the restrictions "laced on commands in sim"le if commands a""ly. All "rocesses detached #ith U are effectively nohu"9d. notify < H3ob = ... ,otify the user asynchronously #hen the status of the current/ or of s"ecified 3obs/ chan$es. onintr < - a label= Lontrol the action of the shell on interru"ts. Qith no ar$uments/ onintr restores the default action of the shell on interru"ts. +The shell terminates shell scri"ts and returns to the terminal command in"ut level-. Qith the - ar$ument/ the shell i$nores all interru"ts. Qith a label ar$ument/ the shell executes a $oto label #hen an interru"t is received or a child "rocess terminates because it #as interru"ted. "o"d <>n= Po" the directory stac!/ and cds to the ne# to" directory. The elements of the directory stac! are numbered from A startin$ at the to". >n 5iscard the n9th entry in the stac!. "ushd <>n a dir= Push a directory onto the directory stac!. Qith no ar$uments/ exchan$e the to" t#o elements. >n 2otate the n9th entry to the to" of the stac! and cd to it. dir Push the current #or!in$ directory onto the stac! and chan$e to dir. rehash 2ecom"ute the internal hash table of the contents of directories listed in the "ath variable to account for ne# commands added. re"eat count command 2e"eat command count times command is sub3ect to the same restrictions as #ith the one-line if statement. set <var < ? value = = set var<n= ? #ord Qith no ar$uments/ set dis"lays the values of all shell variables. *ulti#ord values are dis"layed as a "arenthesi&ed list. Qith the var ar$ument alone/ set assi$ns an em"ty +null- value to the variable var. Qith ar$uments of the form var ? value set assi$ns value to var/ #here value is one of. #ord A sin$le #ord +or uoted strin$-. +#ordlist- A s"ace-se"arated list of #ords enclosed in "arentheses. Falues are command and filename ex"anded before bein$ assi$ned. The form set var<n= ? #ord re"laces the n9th #ord in a multi#ord value #ith #ord. setenv < FA2 < #ord = = Qith no ar$uments/ setenv dis"lays all environment variables. Qith the FA2 ar$ument sets the environment variable FA2 to have an em"ty +null- value. +By convention/ environment variables are normally $iven u""er-case names.- Qith both FA2 and #ord ar$uments setenv sets the environment variable ,A*1 to the value #ord/ #hich must be either a sin$le #ord or a uoted strin$. The most commonly used environment variables/ US12/ T12*/ and PATD/ are automatically im"orted to and ex"orted from the csh variables user/ term/ and "ath4 there is no need to use setenv for these. In addition/ the shell sets the PQ5 environment variable from the csh variable c#d #henever the latter chan$es.

shift < variable = The com"onents of ar$v/ or variable/ if su""lied/ are shifted to the left/ discardin$ the first com"onent. It is an error for the variable not to be set/ or to have a null value. source < -h = name 2eads commands from name. source commands may be nested/ but if they are nested too dee"ly the shell may run out of file descri"tors. An error in a sourced file at any level terminates all nested source commands. -h Place commands from the file name on the history list #ithout executin$ them.

sto" <H3ob= ... Sto" the current or s"ecified bac!$round 3ob. sus"end Sto" the shell in its trac!s/ much as if it had been sent a sto" si$nal #ith 8N. This is most often used to sto" shells started by su. s#itch +strin$case label. ... brea!s# ... default. ... brea!s# ends# 1ach label is successively matched/ a$ainst the s"ecified strin$/ #hich is first command and filename ex"anded. The file metacharacters T/ S and <...= may be used in the case labels/ #hich are variable ex"anded. If none of the labels match before a VdefaultV label is found/ execution be$ins after the default label. 1ach case statement and the default statement must a""ear at the be$innin$ of a line. The command brea!s# continues execution after the ends#. Ether#ise control falls throu$h subse uent case and default statements as #ith L. If no label matches and there is no default/ execution continues after the ends#. time < command = Qith no ar$ument/ "rint a summary of time used by this L shell and its children. Qith an o"tional command/ execute command and "rint a summary of the time it uses. umas! < value = 5is"lay the file creation mas!. Qith value set the file creation mas!. value is $iven in octal/ and is @E2ed #ith the "ermissions of MMM for files and %%% for directories to arrive at the "ermissions for ne# files. Lommon values include AAC/ $ivin$ com"lete access to the $rou"/ and read +and directory search- access to others/ or ACC/ $ivin$ read +and directory search- but not #rite "ermission to the $rou" and others. unalias "attern 5iscard aliases that match +filename substitution- "attern. All aliases are removed by unalias T. unhash 5isable the internal hash table. unlimit < -h = < resource = 2emove a limitation on resource. If no resource is s"ecified/ then all resource limitations are removed. See the descri"tion of the limit command for the list of resource names. -h 2emove corres"ondin$ hard limits. Enly the su"er-user may do this.

unset "attern 2emove variables #hose names match +filename substitution- "attern. All variables are removed by 7unset T94 this has noticeably distasteful sideeffects. unsetenv variable 2emove variable from the environment. Pattern matchin$/ as #ith unset is not "erformed. #ait Qait for bac!$round 3obs to finish +or for an interru"t- before "rom"tin$. #hile +ex"r... end Qhile ex"r is true +evaluates to non-&ero-/ re"eat commands bet#een the #hile and the matchin$ end statement. brea! and continue may be used to terminate or continue the loo" "rematurely. The #hile and end must a""ear alone on their in"ut lines. If the shell9s in"ut is a terminal/ it "rom"ts for commands #ith a uestion-mar! until the end command is entered and then "erforms the commands in the loo". H< 3ob = < U = Brin$ the current or indicated 3ob to the fore$round. Qith the am"ersand/ continue runnin$ 3ob in the bac!$round. Z < var ?ex"r = Z < var<n= ?ex"r = Qith no ar$uments/ dis"lay the values for all shell variables. Qith ar$uments/ the variable var/ or the n9th #ord in the value of var/ to the value that ex"r evaluates to. +If <n= is su""lied/ both var and its n9th com"onent must already exist.If the ex"ression contains the characters Y/ \/ U or a/ then at least this "art of ex"r must be "laced #ithin "arentheses. The o"erators T?/ >?/ etc./ are available as in L. The s"ace se"aratin$ the name from the assi$nment o"erator is o"tional. S"aces are/ ho#ever/ mandatory in se"aratin$ com"onents of ex"r that #ould other#ise be sin$le #ords. S"ecial "ostfix o"erators/ >> and -- increment or decrement name/ res"ectively. l" . l" dis"lays the contents of a "rinter ueue. It re"orts the status of 3obs s"ecified by 3ob^/ or all 3obs o#ned by the user s"ecified by username. l" re"orts on all 3obs in the default "rinter ueue #hen invo!ed #ith no ar$uments. 6or each "rint 3ob in the ueue/ l" re"orts the user9s name/ current "osition/ the names of in"ut files com"risin$ the 3ob/ the 3ob number +by #hich it is referred to #hen usin$ l"rm+0-- and the total si&e in bytes. ,ormally/ only as much information as #ill fit on one line is dis"layed. Oobs are normally ueued on a first-in-first-out basis. 6ilenames com"risin$ a 3ob may be unavailable/ such as #hen l"r is used at the end of a "i"eline4 in such cases the filename field indicates 77+standard in"ut-99. If l" #arns that there is no daemon "resent +that is/ due to some malfunction-/ the l"c+P- command can be used to restart a "rinter daemon. -P "rinter 5is"lay information about the ueue for the s"ecified "rinter. In the absence of the -P o"tion/ the ueue to the "rinter s"ecified by the P2I,T12 variable in the environment is used. If the P2I,T12 variable isn9t set/ the ueue for the default "rinter is used. -l 5is"lay ueue information in lon$ format4 includes the name of the host from #hich the 3ob

ori$inated. >< interval = 5is"lay the s"ool ueue "eriodically until it em"ties. This o"tion clears the terminal screen before re"ortin$ on the ueue. If an interval is su""lied/ l" slee"s that number of seconds in bet#een re"orts. l"r. l"r creates a "rinter 3ob in a s"oolin$ area for subse uent "rintin$ as facilities become available. 1ach "rinter 3ob consists of a control file and one or more data files. The data files are co"ies of +or/ #ith -s / symbolic lin!s to- each filename you s"ecify. The s"ool area is mana$ed by the line "rinter daemon/ l"d+P-. Oobs that s"ecify a "rinter on a remote machine are for#arded by l"d. l"r reads from the standard in"ut if no files are s"ecified. -P"rinter Send out"ut to the named "rinter. Ether#ise send out"ut to the "rinter named in the P2I,T12 environment variable/ or to the default "rinter/ l". -^co"ies Produce the number of co"ies indicated for each named file. 6or exam"le. exam"leH l"r -^I index.c loo!u".c "roduces three co"ies of index.c/ follo#ed by three co"ies of loo!u".c. En the other hand/ exam"leH cat index.c loo!u".c a l"r -^I $enerates three co"ies of the concatenation of the files. -Lclass Print class as the 3ob classification on the burst "a$e. 6or exam"le/ exam"leH l"r -L E"erations ne#.index.c re"laces the system name +the name returned by hostname- #ith VE"erationsV on the burst "a$e/ and "rints the file ne#.index.c. -O3ob Print 3ob as the 3ob name on the burst "a$e. ,ormally/ l"r uses the first file9s name. -Ttitle Use title instead of the file name for the title used by "r+0F-. -i< indent = Indent out"ut indent SPAL1 characters. 1i$ht SPAL1 characters is the default. The indent is "assed to the in"ut filter. If no in"ut filter is "resent/ this o"tion is i$nored. -0 font -C font -I font -B font *ount the s"ecified font on font "osition 0/ C/ I or B. The daemon #ill construct a .railma$ file in the s"ool directory that indicates the mount by referencin$ 'usr'lib'vfont'font. -#cols Use cols as the "a$e #idth for "r. -r 2emove the file u"on com"letion of s"oolin$/ or u"on com"letion of "rintin$ #ith the -s o"tion.

-m -h

Send mail u"on com"letion. Su""ress "rintin$ the burst "a$e.

-s

Lreate a symbolic lin! from the s"ool area to the data files rather than tryin$ to co"y them +so lar$e files can be "rinted-. This means the data files should not be modified or removed until they have been "rinted. This o"tion can be used to avoid truncatin$ files lar$er than the maximum $iven in the mx ca"ability of the "rintca"+J- entry. -s only "revents co"ies of local files from bein$ made. Oobs from remote hosts are co"ied any#ay. -s only #or!s #ith named data files4 if the l"r command is at the end of a "i"eline/ the data is co"ied to the s"ool.

filter-o"tion The follo#in$ sin$le letter o"tions notify the line "rinter s"ooler that the files are not standard text files. The s"oolin$ daemon #ill use the a""ro"riate filters to "rint the data accordin$ly. -" Use "r to format the files +l"r -" is very much li!e 7"r a l"r9-. -l Print control characters and su""ress "a$e brea!s. -t The files contain troff+0- +cat "hototy"esetter- binary data. -n The files contain data from ditroff +device inde"endent troff-. -d The files contain data from tex +5FI format from Stanford-. -$ The files contain standard "lot data as "roduced by the "lot+I@- routines +see also "lot+0G- for the filters used by the "rinter s"ooler-. -v The files contain a raster ima$e/ see rasterfile+J-. The "rinter must su""ort an a""ro"riate ima$in$ model such as PostScri"t in order to "rint the ima$e. -c The files contain data "roduced by cif"lot. -f Inter"ret the first character of each line as a standard 6E2T2A, carria$e control character. If no filter-o"tion is $iven +and the "rinter can inter"ret PostScri"t-/ the strin$ 7H)9 as the first t#o characters of a file indicates that it contains PostScri"t commands. These filter o"tions offer a standard user interface/ and all o"tions may not be available for/ nor a""licable to/ all "rinters. l"rm. l"rm removes a 3ob or 3obs from a "rinter9s s"oolin$ ueue. Since the s"ool directory is "rotected from users/ usin$ l"rm is normally the only method by #hich a user can remove a 3ob. Qithout any ar$uments/ l"rm deletes the 3ob that is currently active/ "rovided that the user #ho invo!ed l"rm o#ns that 3ob. Qhen the su"er-user s"ecifies a username/ l"rm removes all 3obs belon$in$ to that user. Rou can remove a s"ecific 3ob by su""lyin$ its 3ob number as an ar$ument/ #hich you can obtain usin$ l" +0-. 6or exam"le. exam"leH l" -Phost host is ready and "rintin$ 2an! E#ner Oob 6iles Total Si&e active #endy IPJ standard in"ut IJJA0 bytes exam"leH l"rm -Phost IPJ l"rm re"orts the names of any files it removes/ and is silent if there are no a""licable 3obs to remove. l"rm !ills the active "rinter daemon/ if necessary/ before removin$ s"ooled 3obs4 it restarts the daemon #hen throu$h. -P"rinter S"ecify the ueue associated #ith a s"ecific "rinter. Ether#ise the value of the P2I,T12 variable in the environment is used. If this variable is unset/ the ueue for the default "rinter is used.

2emove all 3obs o#ned by you. If invo!ed by the su"er-user/ all 3obs in the s"ool are removed. +Oob o#nershi" is determined by the user9s lo$in name and host name on the machine #here the l"r command #as invo!ed-.

ls. -a/ --all (ist all files in directories/ includin$ all files that start #ith 7.9. -b/ --esca"e [uote non$ra"hic characters in file names usin$ al"habetic and octal bac!slash se uences li!e those used in L. -c/ --time?ctime/ --time?status Sort directory contents accordin$ to the files9 status chan$e time instead of the modification time. If the lon$ listin$ format is bein$ used/ "rint the status chan$e time instead of the modification time. -d/ --directory (ist directories li!e other files/ rather than listin$ their contents. -f 5o not sort directory contents4 list them in #hatever order they are stored on the dis!. The same as enablin$ -a and -U and disablin$ -l/ -s/ and -t. --full-time (ist times in full/ rather than usin$ the standard abbreviation heuristics. -$ I$nored4 for Unix com"atibility.

-i/ --inode Print the index number of each file to the left of the file name. -!/ --!ilobytes If file si&es are bein$ listed/ "rint them in !ilobytes. This overrides the environment variable PESI@(R;LE221LT. -l/ --format?lon$/ --format?verbose In addition to the name of each file/ "rint the file ty"e/ "ermissions/ number of hard lin!s/ o#ner name/ $rou" name/ si&e in bytes/ and timestam" +the modification time unless other times are selected-. 6or files #ith a time that is more than M months old or more than 0 hour into the future/ the timestam" contains the year instead of the time of day. -m/ --format?commas (ist files hori&ontally/ #ith as many as #ill fit on each line/ se"arated by commas. -n/ --numeric-uid-$id (ist the numeric UI5 and GI5 instead of the names. -" A""end a character to each file name indicatin$ the file ty"e.

- / --hide-control-chars Print uestion mar!s instead of non$ra"hic characters in file names. -r/ --reverse Sort directory contents in reverse order.

-s/ --si&e Print the si&e of each file in 0] bloc!s to the left of the file name. If the environment variable PESI@(R;LE221LT is set/ J0C-byte bloc!s are used instead. -t/ --sort?time Sort directory contents by timestam" instead of al"habetically/ #ith the ne#est files listed first. -u/ --time?atime/ --time?access/ --time?use Sort directory contents accordin$ to the files9 last access time instead of the modification time. If the lon$ listin$ format is bein$ used/ "rint the last access time instead of the modification time. -x/ --format?across/ --format?hori&ontal (ist the files in columns/ sorted hori&ontally. -A/ --almost-all (ist all files in directories/ exce"t for 7.9 and 7..9. -B/ --i$nore-bac!u"s 5o not list files that end #ith 7_9/ unless they are $iven on the command line. -L/ --format?vertical (ist files in columns/ sorted vertically. -6/ --classify A""end a character to each file name indicatin$ the file ty"e. 6or re$ular files that are executable/ a""end a 7T9. The file ty"e indicators are 7'9 for directories/ 7Z9 for symbolic lin!s/ 7a9 for 6I6Es/ 7?9 for soc!ets/ and nothin$ for re$ular files. -G/ --no-$rou" Inhibit dis"lay of $rou" information in a lon$ format directory listin$. -(/ --dereference (ist the files lin!ed to by symbolic lin!s instead of listin$ the contents of the lin!s. -,/ --literal 5o not uote file names. -[/ -- uote-name 1nclose file names in double uotes and uote non$ra"hic characters as in L. -2/ --recursive (ist the contents of all directories recursively. -S/ --sort?si&e Sort directory contents by file si&e instead of al"habetically/ #ith the lar$est files listed first. -U/ --sort?none 5o not sort directory contents4 list them in #hatever order they are stored on the dis!. This o"tion is not called -f because the Unix ls -f o"tion also enables -a and disables -l/ -s/ and -t. It seems useless and u$ly to $rou" those unrelated thin$s to$ether in one o"tion. Since this o"tion doesn9t do that/ it has a different name. -@/ --sort?extension Sort directory contents al"habetically by file extension +characters after the last 7.9-4 files #ith no extension are sorted first.

-0/ --format?sin$le-column (ist one file "er line. -#/ --#idth cols Assume the screen is cols columns #ide. The default is ta!en from the terminal driver if "ossible4 other#ise the environment variable LE(U*,S is used if it is set4 other#ise the default is PA. -T/ --tabsi&e cols Assume that each tabsto" is cols columns #ide. The default is P. -I/ --i$nore "attern 5o not list files #hose names match the shell "attern "attern unless they are $iven on the command line. As in the shell/ an initial 7.9 in a filename does not match a #ildcard at the start of "attern. --color/ --colour/ --color?yes/ --colour?yes Lolori&e the names of files de"endin$ on the ty"e of file. See 5ISP(AR LE(E2INATIE, belo#. --color?tty/ --colour?tty Same as --color but only if standard out"ut is a terminal. This is very useful for shell scri"ts and command aliases/ es"ecially if your favorite "a$er does not su""ort color control codes. --color?no/ --colour?no 5isables colori&ation. This is the default. Provided to override a "revious color o"tion. --hel" Print a usa$e messa$e on standard out"ut and exit successfully. --version Print version information on standard out"ut then exit successfully. 5ISP(AR LE(E2INATIE, Qhen usin$ the --color o"tion/ this version of ls #ill colori&e the file names "rinted accordin$ to the name and ty"e of file. By default/ this colori&ation is by ty"e only/ and the codes used are ISE MBCK +A,SI- com"liant. Rou can override the default colors by definin$ the environment variable (S;LE(E2S +or (S;LE(EU2S-. The format of this variable is reminicent of the termca"+J- file format4 a colon-se"arated list of ex"ressions of the form Vxx?strin$V/ #here VxxV is a t#o-character variable name. The variables #ith their associated defaults are. no A ,ormal +non-filename- text fi ln IM Symbolic lin! "i bd BB4I% Bloc! device I0 ,amed "i"e +6I6E- so II Soc!et A 2e$ular file di IC 5irectory

cd ex

BB4I% Lharacter device IJ 1xecutable file

mi or

+none- *issin$ file +defaults to fi+none- Er"hanned symbolic lin! +defaults to ln-

lc rc

`e< (eft code m 2i$ht code

ec

+none- 1nd code +re"laces lc>no>rc-

Rou only need to include the variables you #ant to chan$e from the default. 6ile names can also be colori&ed based on filename extension. This is s"ecified in the (S;LE(E2S variable usin$ the syntax VText?strin$V. 6or exam"le/ usin$ ISE MBCK codes/ to color all L-lan$ua$e source files blue you #ould s"ecify VT.c?IBV. This #ould color all files endin$ in .c in blue +IBcolor. Lontrol characters can be #ritten either in L-style `esca"ed notation/ or in stty-li!e 8-notation. The L-style notation adds `e for 1sca"e/ `; for a normal s"ace characer/ and `S for 5elete. In addition/ the ` esca"e character can be used to override the default inter"retation of `/ 8/ . and ?. 1ach file #ill be #ritten as \lcY \color codeY \rcY \filenameY \ecY. If the \ecY code is undefined/ the se uence \lcY \noY \rcY #ill be used instead. This is $enerally more convenient to use/ but less $eneral. The left/ ri$ht and end codes are "rovided so you don9t have to ty"e common "arts over and over a$ain and to su""ort #eird terminals4 you #ill $enerally not need to chan$e them at all unless your terminal does not use ISE MBCK color se uences but a different system. If your terminal does use ISE MBCK color codes/ you can com"ose the ty"e codes +i.e. all exce"t the lc/ rc/ and ec codes- from numerical commands se"arated by semicolons. The most common commands are. A 0 for bri$hter colors B J for flashin$ text IA for blac! fore$round for underlined text to restore default color

I0 for red fore$round IC II for yello# +or bro#n- fore$round IB IJ for "ur"le fore$round IM I% for #hite +or $ray- fore$round BA B0 for red bac!$round BC BI for yello# +or bro#n- bac!$round BB BJ for "ur"le bac!$round BM B% for #hite +or $ray- bac!$round ,ot all commands #ill #or! on all systems or dis"lay devices. A fe# terminal "ro$rams do not reco$ni&e the default end code "ro"erly. If all text $ets colori&ed after you do a directory listin$/ try chan$in$ the no and fi codes from A to the numerical codes for your standard fore- and bac!$round colors. mail. mail is a comfortable/ flexible/ interactive "ro$ram for com"osin$/ sendin$ and receivin$ electronic messa$es. Qhile readin$ messa$es/ mail "rovides you #ith commands to bro#se/ dis"lay/ save/ delete/ and res"ond to messa$es. Qhile sendin$ mail/ mail allo#s editin$ and revie#in$ of messa$es bein$ com"osed/ and the inclusion of text from files or other messa$es. Incomin$ mail is stored in the system mailbox for each user. This is a file named after the user in 'var's"ool'mail. mail normally loo!s in this file for incomin$ messa$es/ but you can use the *AI( environment variable to have it loo! in a different file. Qhen you read a messa$e/ it is mar!ed to be for cyan bac!$round for blue bac!$round for $reen bac!$round for blac! bac!$round for cyan fore$round for blue fore$round for $reen fore$round

moved to a secondary file for stora$e. This secondary file/ called the mbox/ is normally the file mbox in your home directory. This file can also be chan$ed by settin$ the *BE@ environment variable. *essa$es remain in the mbox file until deliberately removed. If no reci"ient is s"ecified/ mail attem"ts to read messa$es from the system mailbox. -d -e Test for "resence of mail. If there is no mail/ mail "rints nothin$ and exits +#ith a successful return code-. -6 2ecord the messa$e in a file named after the first reci"ient. Everride the record variable/ if set. -D Print header summary only. -i -n 5o not initiali&e from the system default *ail.rc file. -, -U Lonvert uuc" style addresses to Internet standards. Everrides the conv environment variable. -v Pass the -v fla$ to sendmail+P-. 5o not "rint initial header summary. I$nore interru"ts +as #ith the i$nore variable-. Turn on debu$$in$ out"ut. +,either "articularly interestin$ nor recommended.-

-f <filename= 2ead messa$es from filename instead of system mailbox. If no filename is s"ecified/ the mbox is used. -f >folder Use the file folder in the folder directory +same as the folder command-. The name of this directory is listed in the folder variable. -h number The number of net#or! Vho"sV made so far. This is "rovided for net#or! soft#are to avoid infinite delivery loo"s. -r address Pass address to net#or! delivery soft#are. All tilde +_- commands are disabled. -s sub3ect Set the Sub3ect header field to sub3ect. -T file Print the contents of the article-id fields of all messa$es that #ere read or deleted on file +for the use of net#or! ne#s "ro$rams if available-. -u user 2ead user9s system mailbox. This is only effective if user9s system mailbox is not read "rotected.

man. man dis"lays information from the reference manuals. It can dis"lay com"lete manual "a$es that you select by title/ or one-line summaries selected either by !ey#ord +-!-/ or by the name of an associated file +-f-. A section/ #hen $iven/ a""lies to the titles that follo# it on the command line +u" to the next section/ if any-. man loo!s in the indicated section of the manual for those titles. section is either a di$it +"erha"s follo#ed by a sin$le letter indicatin$ the ty"e of manual "a$e-/ or one of the #ords ne#/ local/ old/ or "ublic. The abbreviations n/ l/ o and " are also allo#ed. If section is omitted/ man searches all reference sections +$ivin$ "reference to commands over functions- and "rints the first manual "a$e it finds. If no manual "a$e is located/ man "rints an error messa$e. The reference "a$e sources are ty"ically located in the 'usr'man'manS directories. Since these directories are o"tionally installed/ they may not reside on your host4 you may have to mount 'usr'man from a host on #hich they do reside. If there are "reformatted/ u"-to-date versions in corres"ondin$ catS or fmtS directories/ man sim"ly dis"lays or "rints those versions. If the "reformatted version of interest is out of date or missin$/ man reformats it "rior to dis"lay. If directories for the "reformatted versions are not "rovided/ man reformats a "a$e #henever it is re uested4 it uses a tem"orary file to store the formatted text durin$ dis"lay. If the standard out"ut is not a terminal/ or if the 7-9 fla$ is $iven/ man "i"es its out"ut throu$h cat+0F-. Ether#ise/ man "i"es its out"ut throu$h more+0- to handle "a$in$ and underlinin$ on the screen. -t man arran$es for the s"ecified manual "a$es to be troffed to a suitable raster out"ut device +see troff+0- or vtroff+0--. If both the - and -t fla$s are $iven/ man u"dates the troffed versions of each named title +if necessary-/ but does not dis"lay them. -* "ath Lhan$e the search "ath for manual "a$es. "ath is a colon-se"arated list of directories that contain manual "a$e directory subtrees. 6or exam"le/ 'usr'man'u;man.'usr'man'a;man ma!es man search in the standard System F locations. Qhen used #ith the -! or -f o"tions/ the -* o"tion must a""ear first. 1ach directory in the "ath is assumed to contain subdirectories of the form man<0-Pl-"=. -T macro-"ac!a$e man uses macro-"ac!a$e rather than the standard -man macros defined in 'usr'lib'tmac'tmac.an for formattin$ manual "a$es. -! !ey#ord ... man "rints out one-line summaries from the #hatis database +table of contents- that contain any of the $iven !ey#ords. The #hatis database is created usin$ the catman+P- command #ith the -# o"tion. -f filename ... man attem"ts to locate manual "a$es related to any of the $iven filenames. It stri"s the leadin$ "athname com"onents from each filename/ and then "rints one-line summaries containin$ the resultin$ basename or names. This o"tion also uses the #hatis database. m!dir. m!dir creates directories. Standard entries/ 7.9/ for the directory itself/ and 7..9 for its "arent/ are made automatically. The -" fla$ allo#s missin$ "arent directories to be created as needed. Qith the exce"tion of the set-$id bit/ the current umas!+CF- settin$ determines the mode in #hich directories are created. The ne# directory inherits the set-$id bit of the "arent directory. *odes may be modified after creation by usin$ chmod+0F-. m!dir re uires #rite "ermission in the "arent directory.

more. more is a filter that dis"lays the contents of a text file on the terminal/ one screenful at a time. It normally "auses after each screenful/ and "rints --*ore-- at the bottom of the screen. more "rovides a t#o-line overla" bet#een screens for continuity. If more is readin$ from a file rather than a "i"e/ the "ercenta$e of characters dis"layed so far is also sho#n. more scrolls u" to dis"lay one more line in res"onse to a 21TU2, character4 it dis"lays another screenful in res"onse to a SPAL1 character. Ether commands are listed belo#. "a$e clears the screen before dis"layin$ the next screenful of text4 it only "rovides a one-line overla" bet#een screens. more sets the terminal to noecho mode/ so that the out"ut can be continuous. Lommands that you ty"e do not normally sho# u" on your terminal/ exce"t for the ' and ) commands. If the standard out"ut is not a terminal/ more acts 3ust li!e cat+0F-/ exce"t that a header is "rinted before each file in a series. -c Llear before dis"layin$. 2edra#in$ the screen instead of scrollin$ for faster dis"lays. This o"tion is i$nored if the terminal does not have the ability to clear to the end of a line. -d 5is"lay error messa$es rather than rin$in$ the terminal bell if an unreco$ni&ed command is used. This is hel"ful for inex"erienced users. 5o not fold lon$ lines. This is useful #hen lines contain non"rintin$ characters or esca"e se uences/ such as those $enerated #hen nroff+0- out"ut is "i"ed throu$h ul+0-. 5o not treat 6E2*6115 characters +LT2(-5- as V"a$e brea!s.V If -l is not used/ more "auses to acce"t commands after any line containin$ a 8( character +LT2(-5-. Also/ if a file be$ins #ith a 6E2*6115/ the screen is cleared before the file is "rinted. S uee&e. 2e"lace multi"le blan! lines #ith a sin$le blan! line. This is hel"ful #hen vie#in$ nroff+0- out"ut/ on the screen. -u Su""ress $eneration of underlinin$ esca"e se uences. ,ormally/ more handles underlinin$/ such as that "roduced by nroff+0-/ in a manner a""ro"riate to the terminal. If the terminal can "erform underlinin$ or has a stand-out mode/ more su""lies a""ro"riate esca"e se uences as called for in the text file. -lines 5is"lay the indicated number of lines in each screenful/ rather than the default +the number of lines in the terminal screen less t#o-. >linenumber Start u" at linenumber. >'"attern Start u" t#o lines above the line containin$ the re$ular ex"ression "attern. ,ote. unli!e editors/ this construct should not end #ith a 7'9. If it does/ then the trailin$ slash is ta!en as a character in the search "attern. mv. mv moves files and directories around in the file system. A side effect of mv is to rename a file or directory. The three ma3or forms of mv are sho#n in the syno"sis above. The first form of mv moves +chan$es the name of- filename0 to filenameC. If filenameC already exists/ it is removed before filename0 is moved. If filenameC has a mode #hich forbids #ritin$/ mv

-f

-l

-s

"rints the mode +see chmod+CF-- and reads the standard in"ut to obtain a line4 if the line be$ins #ith y/ the move ta!es "lace/ other#ise mv exits. The second form of mv moves +chan$es the name of- directory0 to directoryC/ only if directoryC does not already exist if it does/ the third form a""lies. The third form of mv moves one or more filenames +may also be directories- #ith their ori$inal names/ into the last directory in the list. mv refuses to move a file or directory onto itself. Inter"ret all the follo#in$ ar$uments to mv as file names. This allo#s file names startin$ #ith minus. -f 6orce. Everride any mode restrictions and the -i o"tion. The -f o"tion also su""resses any #arnin$ messa$es about modes #hich #ould "otentially restrict over#ritin$. -i Interactive mode. mv dis"lays the name of the file or directory follo#ed by a uestion mar! #henever a move #ould re"lace an existin$ file or directory. If you ty"e a line startin$ #ith y/ mv moves the s"ecified file or directory/ other#ise mv does nothin$ #ith that file or directory. "ass#d. "ass#d chan$es +or installs- a "ass#ord/ lo$in shell +-s o"tion-/ or full name +-f o"tionassociated #ith the user username +your o#n by default-. chsh is e uivalent to "ass#d #ith the -s o"tion/ and chfn is e uivalent to "ass#d #ith the -f o"tion. Use 7"ass#d -y9 or y""ass#d+0- to chan$e your "ass#ord in the ,et#or! Information Service +,IS-. This #ill not affect your local "ass#ord/ or your "ass#ord on any remote machines on #hich you have accounts. "ass#d calls y""ass#d automatically if you do not have an entry in the local "ass#d file/ and the -l o"tion is not s"ecified. Qhen chan$in$ a "ass#ord/ "ass#d "rom"ts for the old "ass#ord and then for the ne# one. Rou must su""ly both/ and the ne# "ass#ord must be ty"ed t#ice to forestall mista!es. If "ass#ord a$in$ is enabled/ the first time an ordinary user enters the ne# "ass#ord "ass#d chec!s to see if the old "ass#ord has Va$edV sufficiently. Pass#ord Va$in$V is the amount of time +usually a certain number of days- that must ela"se bet#een "ass#ord chan$es. If Va$in$V is insufficient the ne# "ass#ord is re3ected and "ass#d terminates. ,e# "ass#ords should be at least five characters lon$/ if they combine u""er-case and lo#er-case letters/ or at least six characters lon$ if in monocase. Users that "ersist in enterin$ shorter "ass#ords are com"romisin$ their o#n security. The number of si$nificant characters in a "ass#ord is ei$ht/ althou$h lon$er "ass#ords #ill be acce"ted. Enly the o#ner of the name or the su"er-user may chan$e a "ass#ord4 the o#ner must "rove he !no#s the old "ass#ord. The su"er-user can chan$e any "ass#ord and is not forced to com"ly #ith "ass#ord a$in$ re uirements. Qhen chan$in$ a lo$in shell/ "ass#d dis"lays the current lo$in shell and then "rom"ts for the ne# one. The ne# lo$in shell must be one of the a""roved shells listed in 'etc'shells unless you are the su"er-user. If 'etc'shells does not exist/ the only shells that may be s"ecified are 'bin'sh and 'bin'csh. The su"er-user may chan$e anyone9s lo$in shell4 normal users may only chan$e their o#n lo$in shell. Qhen chan$in$ a full name/ "ass#d dis"lays the current full name/ enclosed bet#een brac!ets/ and "rom"ts for a ne# full name. If you ty"e a 21TU2,/ the full name is not chan$ed. If the full name is to be made blan!/ you must ty"e the #ord VnoneV.

The su"er-user may chan$e anyone9s full name4 normal users may only chan$e their o#n. -a 5is"lay the name and a$in$ information for all users. Lan only be invo!ed by the su"er-user. -f Lhan$e the full name. -l Lhan$e the local "ass#ord/ lo$in shell/ or full name. If username exists in the local "ass#d file/ this is the default. Lhan$e the lo$in shell. Lhan$e "ass#d/ lo$in shell/ or full name in the ,IS database. -d <username= 5is"lay the name and a$in$ information for the caller or the user s"ecified if the invo!er has the ri$ht "rivile$es. -e username 1x"ire the "ass#ord for the user name s"ecified. Lan only be invo!ed by the su"er-user. -6 filename Treat filename as the "ass#ord file. -n numdays username Set the maturity time of the "ass#ord for username. Pass#ords that have not Va$edV enou$h cannot be chan$ed. Lan only be set by the su"er-user. -x numdays username Set the ex"iration time of the "ass#ord for username. Lan only be set by the su"er-user. "s. "s dis"lays information about "rocesses. ,ormally/ only those "rocesses that are runnin$ #ith your effective user I5 and are attached to a controllin$ terminal +see termio+B-- are sho#n. Additional cate$ories of "rocesses can be added to the dis"lay usin$ various o"tions. In "articular/ the -a o"tion allo#s you to include "rocesses that are not o#ned by you +that do not have your user I5-/ and the -x o"tion allo#s you to include "rocesses #ithout control terminals. Qhen you s"ecify both -a and -x/ you $et "rocesses o#ned by anyone/ #ith or #ithout a control terminal. The -r o"tion restricts the list of "rocesses "rinted to Vrunnin$V "rocesses. runnable "rocesses/ those in "a$e #ait/ or those in short-term non-interru"tible #aits. "s dis"lays the "rocess I5/ under PI54 the control terminal +if any-/ under TT4 the c"u time used by the "rocess so far/ includin$ both user and system time-/ under TI*14 the state of the "rocess/ under STAT4 and finally/ an indication of the LE**A,5 that is runnin$. The state is $iven by a se uence of four letters/ for exam"le/ 72Q,A9. 6irst letter indicates the runnability of the "rocess. 2 2unnable "rocesses. T Sto""ed "rocesses.

-s -y

P Processes in "a$e #ait. 5 S Processes slee"in$ for less than about CA seconds. I N Processes that have terminated and that are #aitin$ for their "arent "rocess to do a #ait+CF+V&ombieV "rocesses-. Second letter indicates #hether a "rocess is s#a""ed out4 blan! 2e"resented as a SPAL1 character/ in this "osition indicates that the "rocess is loaded +in memory-. Q Y Process has s"ecified a soft limit on memory re uirements and has exceeded that limit4 such a "rocess is +necessarily- not s#a""ed. Third letter indicates #hether a "rocess is runnin$ #ith altered LPU schedulin$ "riority +nice+0--. blan! 2e"resented as a SPAL1 character/ in this "osition indicates that the "rocess is runnin$ #ithout s"ecial treatment. , The "rocess "riority is reduced/ \ The "rocess "riority has been raised artificially. Process is s#a""ed out. Processes that are idle +slee"in$ lon$er than about CA seconds-. Processes in non-interru"tible #aits4 ty"ically short-term #aits for dis! or ,6S I'E.

6ourth letter indicates any s"ecial treatment of the "rocess for virtual memory re"lacement. The letters corres"ond to o"tions to the vadvise+C- system call. Lurrently the "ossibilities are. blan! 2e"resented as a SPAL1 character/ in this "osition stands for FA;,E2*. A Stands for FA;A,E*. An A ty"ically re"resents a "ro$ram #hich is doin$ $arba$e collection. S Stands for FA;S1[(. An S is ty"ical of lar$e ima$e "rocessin$ "ro$rams that are usin$ virtual memory to se uentially address voluminous data. !ernel-name s"ecifies the location of the system namelist. If the -! o"tion is $iven/ c-dum"-file tells "s #here to loo! for the core dum". Ether#ise/ the core dum" is located in the file 'vmcore and this ar$ument is i$nored. s#a"-file $ives the location of a s#a" file other than the default/ 'dev'drum. "#d. "#d "rints the "athname of the #or!in$ +current- directory. If you are usin$ csh+0-/ you can use the dirs builtin command to do the same 3ob more uic!ly4 but dirs can $ive a different ans#er in the rare case that the current directory or a containin$ directory #as moved after the shell descended into it. This is because "#d searches bac! u" the directory tree to re"ort the true "athname/ #hereas dirs remembers the "athname from the last cd+0command. The exam"le belo# illustrates the differences.

exam"leH cd 'usr'#endy'3anuary're"orts exam"leH "#d 'usr'#endy'3anuary're"orts exam"leH dirs _'3anuary're"orts exam"leH mv _'3anuary _'february exam"leH "#d 'usr'#endy'february're"orts exam"leH dirs _'3anuary're"orts exam"leH "#d and dirs also $ive different ans#ers #hen you chan$e directory throu$h a symbolic lin!. 6or exam"le. exam"leH cd 'usr'#endy'3anuary're"orts exam"leH "#d 'usr'#endy'3anuary're"orts exam"leH dirs _'3anuary're"orts exam"leH ls -l 'usr'#endy'3anuary lr#xr#xr#x 0 #endy 0% Oan IA 0KPI 'usr'#endy'3anuary -Y 'usr'#endy'0KPB'3an' exam"leH cd 'usr'#endy'3anuary exam"leH "#d 'usr'#endy'0KPB'3an exam"leH dirs 'usr'#endy'3anuary The "athnames of files mounted #ith the Automounter can also chan$e if the file is not used for a certain time interval +the default is five minutes-. rm. rm removes +directory entries for- one or more files. If an entry #as the last lin! to the file/ the contents of that file are lost. See ln+0F- for more information about multi"le lin!s to files. To remove a file/ you must have #rite "ermission in its directory4 but you do not need read or #rite "ermission on the file itself. If you do not have #rite "ermission on the file and the standard in"ut is a terminal/ rm dis"lays the file9s "ermissions and #aits for you to ty"e in a res"onse. If your res"onse be$ins #ith y the file is deleted4 other#ise the file is left alone. rmdir removes each named directory. rmdir only removes em"ty directories. Treat the follo#in$ ar$uments as filenames 7-9 so that you can s"ecify filenames startin$ #ith a minus. -f 6orce files to be removed #ithout dis"layin$ "ermissions/ as!in$ uestions or re"ortin$ errors. -i As! #hether to delete each file/ and/ under -r/ #hether to examine each directory. Sometimes called the interactive o"tion. -r 2ecursively delete the contents of a directory/ its subdirectories/ and the directory itself. rmdir. rm removes +directory entries for- one or more files. If an entry #as the last lin! to the file/ the contents of that file are lost. See ln+0F- for more information about multi"le lin!s to files. To remove a file/ you must have #rite "ermission in its directory4 but you do not need read or #rite "ermission on the file itself. If you do not have #rite "ermission on the file and the standard in"ut is a terminal/ rm dis"lays the file9s "ermissions and #aits for you to ty"e in a res"onse. If your res"onse be$ins #ith y the file is deleted4 other#ise the file is left alone.

rmdir removes each named directory. rmdir only removes em"ty directories. Treat the follo#in$ ar$uments as filenames 7-9 so that you can s"ecify filenames startin$ #ith a minus. -f 6orce files to be removed #ithout dis"layin$ "ermissions/ as!in$ uestions or re"ortin$ errors. -i As! #hether to delete each file/ and/ under -r/ #hether to examine each directory. Sometimes called the interactive o"tion. -r 2ecursively delete the contents of a directory/ its subdirectories/ and the directory itself. s"ell. s"ell collects #ords from the named files/ and loo!s them u" in a hashed s"ellin$ list. Qords that do not a""ear in the list/ or cannot be derived from those that do a""ear by a""lyin$ certain inflections/ "refixes or suffixes/ are dis"layed on the standard out"ut. If there are no filename ar$uments/ #ords to chec! are collected from the standard in"ut. s"ell i$nores most troff+0-/ tbl+0-/ and e n+0- constructs. Lo"ies of all out"ut #ords are accumulated in the history file/ and a sto" list filters out miss"ellin$s +for exam"le/ their?thy-y>ier- that #ould other#ise "ass. By default/ s"ell +li!e deroff+0-- follo#s chains of included files +.so and .nx troff+0- re uests-/ unless the names of such included files be$in #ith 'usr'lib. If a >local;file ar$ument is s"ecified/ #ords found in local;file are removed from s"ell9s out"ut. local;file is the name of a user-"rovided file that contains a sorted list of #ords/ one "er line. Qith this o"tion/ the user can s"ecify a set of #ords that are correct s"ellin$s +in addition to s"ell9s o#n s"ellin$ list- for each 3ob. The standard s"ellin$ list is based on many sources/ and #hile more ha"ha&ard than an ordinary dictionary/ is also more effective in res"ect to "ro"er names and "o"ular technical #ords. Lovera$e of the s"eciali&ed vocabularies of biolo$y/ medicine and chemistry is li$ht. Three "ro$rams hel" maintain and chec! the hash lists used by s"ell. hashma!e 2eads a list of #ords from the standard in"ut and #rites the corres"ondin$ nine-di$it hash code on the standard out"ut. s"ellin 2eads n hash codes from the standard in"ut and #rites a com"ressed s"ellin$ list on the standard out"ut. hashchec! 2eads a com"ressed s"ellin$;list and recreates the nine-di$it hash codes for all the #ords in it4 it #rites these codes on the standard out"ut. -b Lhec! British s"ellin$. Besides "referrin$ VcentreV/ VcolourV/ V"ro$rammeV/ Vs"ecialityV/ VtravelledV/ and so on/ this o"tion insists u"on -ise in #ords li!e standardi&e/ des"ite #hat 6o#ler and the E15 say. -l 6ollo# the chains of all included files.

-v Print all #ords not literally in the s"ellin$ list/ as #ell as "lausible derivations from s"ellin$ list #ords. -x Print every "lausible stem #ith 7?9 for each #ord. -d hlist Use the file hlist as the hashed s"ellin$ list. -h s"ellhist Place miss"elled #ords #ith a user'date stam" in file s"ellhist. -s hsto" Use hsto" as the hashed sto" list.

,ot all command descri"tions #ere listed here. But loo! for the u"date to this text/ it #ill have more commands and more descri"tions. This text file #as 3ust one of the many files made by The Psychotic Internet Services.

Potrebbero piacerti anche