Blame


1 78e51a8c 2005-01-14 devnull <head>
2 78e51a8c 2005-01-14 devnull <title>ls(1) - Plan 9 from User Space</title>
3 78e51a8c 2005-01-14 devnull <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
4 78e51a8c 2005-01-14 devnull </head>
5 78e51a8c 2005-01-14 devnull <body bgcolor=#ffffff>
6 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0 width=100%>
7 78e51a8c 2005-01-14 devnull <tr height=10><td>
8 78e51a8c 2005-01-14 devnull <tr><td width=20><td>
9 78e51a8c 2005-01-14 devnull <tr><td width=20><td><b>LS(1)</b><td align=right><b>LS(1)</b>
10 78e51a8c 2005-01-14 devnull <tr><td width=20><td colspan=2>
11 78e51a8c 2005-01-14 devnull <br>
12 78e51a8c 2005-01-14 devnull <p><font size=+1><b>NAME </b></font><br>
13 78e51a8c 2005-01-14 devnull
14 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
15 78e51a8c 2005-01-14 devnull
16 78e51a8c 2005-01-14 devnull ls, lc &ndash; list contents of directory<br>
17 78e51a8c 2005-01-14 devnull
18 78e51a8c 2005-01-14 devnull </table>
19 78e51a8c 2005-01-14 devnull <p><font size=+1><b>SYNOPSIS </b></font><br>
20 78e51a8c 2005-01-14 devnull
21 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
22 78e51a8c 2005-01-14 devnull
23 78e51a8c 2005-01-14 devnull <tt><font size=+1>ls</font></tt> [ <tt><font size=+1>&#8722;dlmnpqrstuFQ</font></tt> ] <i>name ...
24 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
25 78e51a8c 2005-01-14 devnull </i>
26 78e51a8c 2005-01-14 devnull <tt><font size=+1>lc</font></tt> [ <tt><font size=+1>&#8722;dlmnpqrstuFQ</font></tt> ] <i>name ...<br>
27 78e51a8c 2005-01-14 devnull </i>
28 78e51a8c 2005-01-14 devnull </table>
29 78e51a8c 2005-01-14 devnull <p><font size=+1><b>DESCRIPTION </b></font><br>
30 78e51a8c 2005-01-14 devnull
31 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
32 78e51a8c 2005-01-14 devnull
33 78e51a8c 2005-01-14 devnull For each directory argument, <i>ls</i> lists the contents of the directory;
34 78e51a8c 2005-01-14 devnull for each file argument, <i>ls</i> repeats its name and any other information
35 78e51a8c 2005-01-14 devnull requested. When no argument is given, the current directory is
36 78e51a8c 2005-01-14 devnull listed. By default, the output is sorted alphabetically by name.
37 78e51a8c 2005-01-14 devnull
38 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
39 78e51a8c 2005-01-14 devnull
40 78e51a8c 2005-01-14 devnull <i>Lc</i> is the same as <i>ls</i>, but sets the <tt><font size=+1>&#8722;p</font></tt> option and pipes the output
41 78e51a8c 2005-01-14 devnull through <a href="../man1/mc.html"><i>mc</i>(1)</a>.
42 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
43 78e51a8c 2005-01-14 devnull
44 78e51a8c 2005-01-14 devnull There are a number of options:<br>
45 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;If argument is a directory, list it, not its contents.<br>
46 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;l</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;List in long format, giving mode (see below), file system type
47 78e51a8c 2005-01-14 devnull (e.g., for devices, the <tt><font size=+1>#</font></tt> code letter that names it; see <a href="../man3/intro.html"><i>intro</i>(3)</a>),
48 78e51a8c 2005-01-14 devnull the instance or subdevice number, owner, group, size in bytes,
49 78e51a8c 2005-01-14 devnull and time of last modification for each file.<br>
50 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;List the name of the user who most recently modified the file.<br>
51 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Don&#8217;t sort the listing.<br>
52 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print only the final path element of each file name.<br>
53 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;List the <i>qid</i> (see <a href="../man3/stat.html"><i>stat</i>(3)</a>) of each file; the printed fields
54 78e51a8c 2005-01-14 devnull are in the order path, version, and type.<br>
55 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Reverse the order of sort.<br>
56 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Give size in Kbytes for each entry.<br>
57 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Sort by time modified (latest first) instead of by name.<br>
58 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Under <tt><font size=+1>&#8722;t</font></tt> sort by time of last access; under <tt><font size=+1>&#8722;l</font></tt> print time of
59 78e51a8c 2005-01-14 devnull last access.<br>
60 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;F</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Add the character <tt><font size=+1>/</font></tt> after all directory names and the character
61 78e51a8c 2005-01-14 devnull <tt><font size=+1>*</font></tt> after all executable files.<br>
62 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print the character <tt><font size=+1>t</font></tt> before each file if it has the temporary
63 78e51a8c 2005-01-14 devnull flag set, and <tt><font size=+1>&#8722;</font></tt> otherwise.<br>
64 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;Q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;By default, printed file names are quoted if they contain characters
65 78e51a8c 2005-01-14 devnull special to <a href="../man1/rc.html"><i>rc</i>(1)</a>. The <tt><font size=+1>&#8722;Q</font></tt> flag disables this behavior.
66 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
67 78e51a8c 2005-01-14 devnull
68 78e51a8c 2005-01-14 devnull The mode printed under the <tt><font size=+1>&#8722;l</font></tt> option contains 11 characters, interpreted
69 78e51a8c 2005-01-14 devnull as follows: the first character is<br>
70 78e51a8c 2005-01-14 devnull <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the entry is a directory;<br>
71 78e51a8c 2005-01-14 devnull <tt><font size=+1>a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the entry is an append-only file;<br>
72 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the entry is a plain file.
73 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
74 78e51a8c 2005-01-14 devnull
75 78e51a8c 2005-01-14 devnull The next letter is <tt><font size=+1>l</font></tt> if the file is exclusive access (one writer
76 78e51a8c 2005-01-14 devnull or reader at a time).
77 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
78 78e51a8c 2005-01-14 devnull
79 78e51a8c 2005-01-14 devnull The last 9 characters are interpreted as three sets of three bits
80 78e51a8c 2005-01-14 devnull each. The first set refers to owner permissions; the next to permissions
81 78e51a8c 2005-01-14 devnull to others in the same user-group; and the last to all others.
82 78e51a8c 2005-01-14 devnull Within each set the three characters indicate permission respectively
83 78e51a8c 2005-01-14 devnull to read, to write, or to execute the file as a program.
84 78e51a8c 2005-01-14 devnull For a directory, &#8216;execute&#8217; permission is interpreted to mean permission
85 78e51a8c 2005-01-14 devnull to search the directory for a specified file. The permissions
86 78e51a8c 2005-01-14 devnull are indicated as follows:<br>
87 78e51a8c 2005-01-14 devnull <tt><font size=+1>r</font></tt>if the file is readable;<br>
88 78e51a8c 2005-01-14 devnull <tt><font size=+1>w</font></tt>if the file is writable;<br>
89 78e51a8c 2005-01-14 devnull <tt><font size=+1>x</font></tt>if the file is executable;<br>
90 78e51a8c 2005-01-14 devnull <tt><font size=+1>&#8722;</font></tt>if none of the above permissions is granted.<br>
91 78e51a8c 2005-01-14 devnull
92 78e51a8c 2005-01-14 devnull </table>
93 78e51a8c 2005-01-14 devnull <p><font size=+1><b>SOURCE </b></font><br>
94 78e51a8c 2005-01-14 devnull
95 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
96 78e51a8c 2005-01-14 devnull
97 78e51a8c 2005-01-14 devnull <tt><font size=+1>/usr/local/plan9/src/cmd/ls.c<br>
98 78e51a8c 2005-01-14 devnull /usr/local/plan9/bin/lc<br>
99 78e51a8c 2005-01-14 devnull </font></tt>
100 78e51a8c 2005-01-14 devnull </table>
101 78e51a8c 2005-01-14 devnull <p><font size=+1><b>SEE ALSO </b></font><br>
102 78e51a8c 2005-01-14 devnull
103 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
104 78e51a8c 2005-01-14 devnull
105 78e51a8c 2005-01-14 devnull <a href="../man3/stat.html"><i>stat</i>(3)</a>, <a href="../man1/mc.html"><i>mc</i>(1)</a><br>
106 78e51a8c 2005-01-14 devnull
107 78e51a8c 2005-01-14 devnull </table>
108 78e51a8c 2005-01-14 devnull
109 78e51a8c 2005-01-14 devnull <td width=20>
110 78e51a8c 2005-01-14 devnull <tr height=20><td>
111 78e51a8c 2005-01-14 devnull </table>
112 78e51a8c 2005-01-14 devnull <!-- TRAILER -->
113 78e51a8c 2005-01-14 devnull <table border=0 cellpadding=0 cellspacing=0 width=100%>
114 78e51a8c 2005-01-14 devnull <tr height=15><td width=10><td><td width=10>
115 78e51a8c 2005-01-14 devnull <tr><td><td>
116 78e51a8c 2005-01-14 devnull <center>
117 78e51a8c 2005-01-14 devnull <a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
118 78e51a8c 2005-01-14 devnull </center>
119 78e51a8c 2005-01-14 devnull </table>
120 78e51a8c 2005-01-14 devnull <!-- TRAILER -->
121 78e51a8c 2005-01-14 devnull </body></html>