📄 ls.1
字号:
.th LS I 3/20/74.sh NAMEls \*- list contents of directory.sh SYNOPSIS.bd ls[.bd \*-ltasdruifg] name ....sh DESCRIPTIONFor each directory argument,.it lslists the contents of the directory;for each file argument,.it lsrepeats its name and any other information requested.The output is sorted alphabetically by default.When no argument is given, the current directory is listed.When several arguments are given,the arguments are first sorted appropriately,but file arguments appearbefore directories and their contents.There are several options:.s3.lp +4 4\fB\*-l\fR list in long format, giving mode, number of links, owner,size in bytes, and time of last modificationfor each file.(See below.)If the file is a special file the size field will instead containthe major and minor device numbers..s3.lp +4 4\fB\*-t\fR sort by time modified (latest first) instead ofby name, as is normal.s3.lp +4 4\fB\*-a\fR list all entries; usually those beginning with `\fB.\fR' aresuppressed.s3.lp +4 4\fB\*-s\fR give size in blocks for each entry.s3.lp +4 4\fB\*-d\fR if argument is a directory, list only its name, notits contents (mostly used with.bd \*-lto get statuson directory).s3.lp +4 4\fB\*-r\fR reverse the order of sort to get reverse alphabeticor oldest first as appropriate.s3.lp +4 4\fB\*-u\fR use time of last access instead of lastmodification for sorting (\fB\*-t\fR) or printing(\fB\*-l\fR).s3.lp +4 4\fB\*-i\fR print i-number in first columnof the report for each file listed.s3.lp +4 4\fB\*-f\fR force each argument to be interpreted as a directoryand list the name found in each slot.This option turns off.bd "\*-l, \*-t, \*-s,"and.bd \*-r,andturns on.bd \*-a;the order is the order in which entriesappear in the directory..s3.lp +4 4\fB\-g\fR Give group ID instead of owner ID in long listing..s3.i0The mode printed under the.bd \*-loption contains 11 characterswhich are interpretedas follows:the first character is.s3.lp +3 3\fBd\fR if the entry is a directory;.lp +3 3\fBb\fR if the entry is a block-type special file;.lp +3 3\fBc\fR if the entry is a character-type special file;.lp +3 3\fB\*-\fR if the entry is a plain file..s3.i0The next 9 characters are interpretedas three sets of three bits each.The first set refers to owner permissions;the next to permissions to others in the same user-group;and the last to all others.Within each set the three characters indicatepermission respectively to read, to write, or toexecute the file as a program.For a directory, `execute' permission is interpretedto mean permission to search the directoryfor a specified file.The permissions are indicated as follows:.s3.lp +3 3\fBr\fR if the file is readable.lp +3 3\fBw\fR if the file is writable.lp +3 3\fBx\fR if the file is executable.lp +3 3\fB\*-\fR if the indicated permission is not granted.s3.i0The group-execute permission character is givenas.bd sif the file has set-group-ID mode;likewise the user-execute permission character is givenas.bd sif the file has set-user-ID mode..s3The last character of the mode is normally blank but is printed as``t'' if the 1000 bit of the mode is on.See.it "chmod (I)"for the current meaning of this mode..sh FILES/etc/passwd to get user ID's for\fBls \*-l\fR..sh BUGS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -