3 cfa37a7b 2004-04-10 devnull ls, lc \- list contents of directory
4 cfa37a7b 2004-04-10 devnull .SH SYNOPSIS
7 cfa37a7b 2004-04-10 devnull .B -dlmnpqrstuFQ
9 cfa37a7b 2004-04-10 devnull .I name ...
13 058b0118 2005-01-03 devnull .B -dlmnpqrstuFQ
15 cfa37a7b 2004-04-10 devnull .I name ...
16 cfa37a7b 2004-04-10 devnull .SH DESCRIPTION
17 cfa37a7b 2004-04-10 devnull For each directory argument,
19 cfa37a7b 2004-04-10 devnull lists the contents of the directory;
20 cfa37a7b 2004-04-10 devnull for each file argument,
22 cfa37a7b 2004-04-10 devnull repeats its name and any other information requested.
23 cfa37a7b 2004-04-10 devnull When no argument is given, the current directory is listed.
24 cfa37a7b 2004-04-10 devnull By default, the output is sorted alphabetically by name.
27 cfa37a7b 2004-04-10 devnull is the same as
29 cfa37a7b 2004-04-10 devnull but sets the
31 cfa37a7b 2004-04-10 devnull option and pipes the output through
32 cfa37a7b 2004-04-10 devnull .IR mc (1).
34 cfa37a7b 2004-04-10 devnull There are a number of options:
37 cfa37a7b 2004-04-10 devnull If argument is a directory, list it, not
38 cfa37a7b 2004-04-10 devnull its contents.
41 cfa37a7b 2004-04-10 devnull List in long format, giving mode (see below), file system type
42 cfa37a7b 2004-04-10 devnull (e.g., for devices, the
44 cfa37a7b 2004-04-10 devnull code letter that names it; see
45 cfa37a7b 2004-04-10 devnull .IR intro (3)),
46 cfa37a7b 2004-04-10 devnull the instance or subdevice number, owner, group,
47 cfa37a7b 2004-04-10 devnull size in bytes, and time of last modification
48 cfa37a7b 2004-04-10 devnull for each file.
51 cfa37a7b 2004-04-10 devnull List the name of the user who most recently modified the file.
54 cfa37a7b 2004-04-10 devnull Don't sort the listing.
57 cfa37a7b 2004-04-10 devnull Print only the final path element of each file name.
63 058b0118 2005-01-03 devnull .IR stat (3))
64 cfa37a7b 2004-04-10 devnull of each file; the printed fields are in the order
65 cfa37a7b 2004-04-10 devnull path, version, and type.
68 cfa37a7b 2004-04-10 devnull Reverse the order of sort.
71 cfa37a7b 2004-04-10 devnull Give size in Kbytes for each entry.
74 cfa37a7b 2004-04-10 devnull Sort by time modified (latest first) instead of
80 cfa37a7b 2004-04-10 devnull sort by time of last access;
83 cfa37a7b 2004-04-10 devnull print time of last access.
86 cfa37a7b 2004-04-10 devnull Add the character
88 cfa37a7b 2004-04-10 devnull after all directory names
89 cfa37a7b 2004-04-10 devnull and the character
91 cfa37a7b 2004-04-10 devnull after all executable files.
94 cfa37a7b 2004-04-10 devnull Print the character
96 cfa37a7b 2004-04-10 devnull before each file if it has the temporary flag set, and
98 cfa37a7b 2004-04-10 devnull otherwise.
101 cfa37a7b 2004-04-10 devnull By default, printed file names are quoted if they contain characters special to
102 cfa37a7b 2004-04-10 devnull .IR rc (1).
105 cfa37a7b 2004-04-10 devnull flag disables this behavior.
107 cfa37a7b 2004-04-10 devnull The mode printed under the
109 cfa37a7b 2004-04-10 devnull option contains 11 characters,
110 cfa37a7b 2004-04-10 devnull interpreted
111 cfa37a7b 2004-04-10 devnull as follows:
112 cfa37a7b 2004-04-10 devnull the first character is
115 cfa37a7b 2004-04-10 devnull if the entry is a directory;
118 cfa37a7b 2004-04-10 devnull if the entry is an append-only file;
121 8a750906 2005-02-08 devnull if the entry is a Unix device;
124 8a750906 2005-02-08 devnull if the entry is a symbolic link;
127 8a750906 2005-02-08 devnull if the entry is a named pipe;
130 8a750906 2005-02-08 devnull if the entry is a socket;
133 cfa37a7b 2004-04-10 devnull if the entry is a plain file.
136 cfa37a7b 2004-04-10 devnull The next letter is
138 cfa37a7b 2004-04-10 devnull if the file is exclusive access (one writer or reader at a time).
140 cfa37a7b 2004-04-10 devnull The last 9 characters are interpreted
141 cfa37a7b 2004-04-10 devnull as three sets of three bits each.
142 cfa37a7b 2004-04-10 devnull The first set refers to owner permissions;
143 cfa37a7b 2004-04-10 devnull the next to permissions to others in the same user-group;
144 cfa37a7b 2004-04-10 devnull and the last to all others.
145 cfa37a7b 2004-04-10 devnull Within each set the three characters indicate
146 cfa37a7b 2004-04-10 devnull permission respectively to read, to write, or to
147 cfa37a7b 2004-04-10 devnull execute the file as a program.
148 cfa37a7b 2004-04-10 devnull For a directory, `execute' permission is interpreted
149 cfa37a7b 2004-04-10 devnull to mean permission to search the directory
150 cfa37a7b 2004-04-10 devnull for a specified file.
151 cfa37a7b 2004-04-10 devnull The permissions are indicated as follows:
154 cfa37a7b 2004-04-10 devnull if the file is readable;
158 cfa37a7b 2004-04-10 devnull if the file is writable;
161 cfa37a7b 2004-04-10 devnull if the file is executable;
164 cfa37a7b 2004-04-10 devnull if none of the above permissions is granted.
166 cfa37a7b 2004-04-10 devnull .SH SOURCE
167 c3674de4 2005-01-11 devnull .B \*9/src/cmd/ls.c
169 c3674de4 2005-01-11 devnull .B \*9/bin/lc
170 cfa37a7b 2004-04-10 devnull .SH SEE ALSO
171 c8b6342d 2005-01-13 devnull .IR stat (3),
172 cfa37a7b 2004-04-10 devnull .IR mc (1)