Annotation of researchv10dc/man/adm/man1/ls.1, revision 1.1.1.1

1.1       root        1: .TH LS 1
                      2: .CT 1 files dirs
                      3: .SH NAME
                      4: ls, lc \(mi list contents of directory
                      5: .SH SYNOPSIS
                      6: .B ls
                      7: [
                      8: .B -acdfilrstuFLR
                      9: ]
                     10: .I name ...
                     11: .PP
                     12: .B lc
                     13: [
                     14: .I options
                     15: ]
                     16: .I name ...
                     17: .SH DESCRIPTION
                     18: For each directory argument,
                     19: .I ls
                     20: lists the contents of the directory;
                     21: for each file argument,
                     22: .I ls
                     23: repeats its name and any other information requested.
                     24: The output is sorted alphabetically by default.
                     25: When no argument is given, the current directory is listed.
                     26: When several arguments are given,
                     27: the arguments are first sorted,
                     28: but file arguments appear
                     29: before directories and their contents.
                     30: .PP
                     31: .I Lc
                     32: is the same as
                     33: .I ls,
                     34: but prints the list in multiple columns.
                     35: .PP
                     36: There are an unbelievable number of options:
                     37: .TP
                     38: .B  -l
                     39: List in long format, giving mode (see below), number of links, owner,
                     40: group,
                     41: size in bytes, and time of last modification
                     42: for each file.
                     43: Symbolic links are identified by a link count marked 
                     44: .LR L ;
                     45: the link count is that of the ultimate file.
                     46: If the file is a special file the size field will instead contain
                     47: the major and minor device numbers.
                     48: .TP
                     49: .B  -d
                     50: If argument is a directory, list its name, not
                     51: its contents.
                     52: .TP
                     53: .B  -t
                     54: Sort by time modified (latest first) instead of
                     55: by name, as is normal.
                     56: .TP
                     57: .B -L
                     58: Under
                     59: .B -l
                     60: for each symbolic link
                     61: give the immediate, not the ultimate, link count
                     62: and append the name pointed to.
                     63: .TP
                     64: .B  -a
                     65: List all entries; usually
                     66: .F .
                     67: and
                     68: .F ..
                     69: are suppressed.
                     70: .TP
                     71: .B  -c
                     72: Under
                     73: .B -t
                     74: sort by time of inode change;
                     75: under
                     76: .B -l
                     77: print time of inode change.
                     78: .TP
                     79: .B  -f
                     80: Force each argument to be interpreted as a directory
                     81: and list the name found in each slot.
                     82: This option turns off
                     83: .BR -l ", " -t ", " -s ,
                     84: and
                     85: .BR -r ,
                     86: and
                     87: turns on
                     88: .BR -a ;
                     89: the order is the order in which entries
                     90: appear in the directory.
                     91: .TP
                     92: .B  -F
                     93: Mark directories with a trailing 
                     94: .L /
                     95: and executable
                     96: files with a trailing 
                     97: .L *
                     98: .TP
                     99: .B  -i
                    100: Print i-number in first column
                    101: of the report for each file listed.
                    102: .TP
                    103: .B  -r
                    104: Reverse the order of sort to get reverse alphabetic
                    105: or oldest first as appropriate.
                    106: .TP
                    107: .B  -R
                    108: recursively list subdirectories encountered.
                    109: .TP
                    110: .B  -s
                    111: Give size in Kbytes for each entry.
                    112: .TP
                    113: .B  -u
                    114: Under
                    115: .B -t
                    116: sort by time of last access;
                    117: under
                    118: .B -l
                    119: print time of last access.
                    120: .PP
                    121: The mode printed under the
                    122: .B -l
                    123: option contains 11 characters
                    124: which are interpreted
                    125: as follows:
                    126: the first character is
                    127: .TP
                    128: .B  d
                    129: if the entry is a directory;
                    130: .PD 0
                    131: .TP
                    132: .B  b
                    133: if the entry is a block-type special file;
                    134: .TP
                    135: .B  c
                    136: if the entry is a character-type special file;
                    137: .TP
                    138: .B l
                    139: if the entry is a symbolic link and option
                    140: .B -L
                    141: is in effect;
                    142: .TP
                    143: .B  -
                    144: if the entry is a plain file.
                    145: .PD
                    146: .PP
                    147: The next 9 characters are interpreted
                    148: as three sets of three bits each.
                    149: The first set refers to owner permissions;
                    150: the next to permissions to others in the same user-group;
                    151: and the last to all others.
                    152: Within each set the three characters indicate
                    153: permission respectively to read, to write, or to
                    154: execute the file as a program.
                    155: For a directory, `execute' permission is interpreted
                    156: to mean permission to search the directory
                    157: for a specified file.
                    158: The permissions are indicated as follows:
                    159: .TP 3
                    160: .B  r
                    161: if the file is readable;
                    162: .PD 0
                    163: .TP 3
                    164: .B  w
                    165: if the file is writable;
                    166: .TP 3
                    167: .B  x
                    168: if the file is executable;
                    169: .TP 3
                    170: .B  -
                    171: if the indicated permission is not granted.
                    172: .PD
                    173: .PP
                    174: The group-execute permission character is given
                    175: as
                    176: .B s
                    177: if the file has set-group-ID mode;
                    178: likewise the user-execute permission character is given
                    179: as
                    180: .B s
                    181: if the file has set-user-ID mode.
                    182: .PP
                    183: The last character of the mode (normally a blank)
                    184: indicates the type of concurrency control:
                    185: .TP
                    186: .B  e
                    187: if the file is set for exclusive access (1 writer or
                    188: .I n
                    189: readers);
                    190: .PD 0
                    191: .TP
                    192: .B  y
                    193: if the file is set for synchronized access (1 writer and
                    194: .I n
                    195: readers);
                    196: .PD
                    197: .SH FILES
                    198: .FR /etc/passwd
                    199: .br
                    200: .FR /etc/group
                    201: .SH SEE ALSO
                    202: .IR stat (2)
                    203: .SH BUGS
                    204: Option
                    205: .B -s
                    206: counts unwritten holes as if they were real data.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.