|
|
1.1 root 1: .TH LS 1
2: .SH NAME
3: ls, lc \- list contents of directory
4: .SH SYNOPSIS
5: .B ls
6: [
7: .B -dlnpqrstuF
8: ]
9: .I name ...
10: .PP
11: .B lc
12: [
13: .B -dlnqrstuF
14: ]
15: .I name ...
16: .SH DESCRIPTION
17: For each directory argument,
18: .I ls
19: lists the contents of the directory;
20: for each file argument,
21: .I ls
22: repeats its name and any other information requested.
23: When no argument is given, the current directory is listed.
24: By default, the output is sorted alphabetically by name.
25: .PP
26: .I Lc
27: is the same as
28: .IR ls ,
29: but sets the
30: .B -p
31: option and pipes the output through
32: .IR mc (1).
33: .PP
34: There are a number of options:
35: .TP
36: .B -d
37: If argument is a directory, list it, not
38: its contents.
39: .TP
40: .B -l
41: List in long format, giving mode (see below), file system type
42: (e.g., for devices, the
43: .B #
44: code letter that names it; see
45: .IR Intro (4)),
46: the instance or subdevice number, owner, group,
47: size in bytes, and time of last modification
48: for each file.
49: .TP
50: .B -n
51: Don't sort the listing.
52: .TP
53: .B -p
54: Print only the final path element of each file name.
55: .TP
56: .B -q
57: List the
58: .I qid
59: (see
60: .IR stat (2))
61: of each file.
62: .TP
63: .B -r
64: Reverse the order of sort.
65: .TP
66: .B -s
67: Give size in Kbytes for each entry.
68: .TP
69: .B -t
70: Sort by time modified (latest first) instead of
71: by name.
72: .TP
73: .B -u
74: Under
75: .B -t
76: sort by time of last access;
77: under
78: .B -l
79: print time of last access.
80: .TP
81: .B -F
82: Add the character
83: .B /
84: after all directory names
85: and the character
86: .B *
87: after all executable files.
88: .PP
89: The mode printed under the
90: .B -l
91: option contains 11 characters,
92: interpreted
93: as follows:
94: the first character is
95: .TP
96: .B d
97: if the entry is a directory;
98: .PD 0
99: .TP
100: .B a
101: if the entry is an append-only file;
102: .TP
103: .B -
104: if the entry is a plain file.
105: .PD
106: .PP
107: The next letter is
108: .B l
109: if the file is exclusive access (one writer or reader at a time).
110: .PP
111: The last 9 characters are interpreted
112: as three sets of three bits each.
113: The first set refers to owner permissions;
114: the next to permissions to others in the same user-group;
115: and the last to all others.
116: Within each set the three characters indicate
117: permission respectively to read, to write, or to
118: execute the file as a program.
119: For a directory, `execute' permission is interpreted
120: to mean permission to search the directory
121: for a specified file.
122: The permissions are indicated as follows:
123: .TP 3
124: .B r
125: if the file is readable;
126: .PD 0
127: .TP 3
128: .B w
129: if the file is writable;
130: .TP 3
131: .B x
132: if the file is executable;
133: .TP 3
134: .B -
135: if none of the above permissions is granted.
136: .PD
137: .SH SOURCE
138: .B /sys/src/cmd/ls.c
139: .br
140: .B /rc/bin/lc
141: .SH SEE ALSO
142: .IR stat (2)
143: .IR mc (1)
144:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.