source: trunk/minix/man/man1/ls.1@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 3.6 KB
Line 
1.TH LS 1
2.SH NAME
3ls \- list the contents of a directory
4.SH SYNOPSIS
5\fBls\fP [\fB\-acdfghilpqrstu1ACDFLMRTX\fP] [\fIname\fP...]
6.SH DESCRIPTION
7For each file argument, list it. For each directory argument, list its
8contents. The current working directory is listed when no files are named.
9Information is printed multicolumn on terminals, single column if the output
10is redirected. The options control what information is shown and how.
11.PP
12.B Ls
13has two sources other then the command line to draw options from, one is
14the environment variable
15.B LSOPTS
16that is scanned for option letters when the output of
17.B ls
18is displayed on a terminal. The other is the name of
19.B ls
20itself. If
21.B ls
22is linked to another name, then all the characters after the l are used as
23flags too, except that d, f, r, t and x are translated to D, F, R, T and X.
24Useful links are
25.BR ll ,
26.BR lf ,
27.B lm
28and
29.BR lx .
30.PP
31Files whose names start with a dot are by default not listed.
32.PP
33Note that standard MINIX 3 doesn't have symbolic links or sockets and
34.B \-u
35and
36.B \-c
37are no-ops on a V1 file system, since only modified times are stored in V1
38inodes.
39.SH OPTIONS
40.TP
41.B \-a
42All entries are listed, even
43.B .
44and
45.B ..
46.TP
47.B \-c
48Use inode changed time for sorting, listing or searching.
49.TP
50.B \-d
51Do not list contents of directories, but list the directory itself.
52.TP
53.B \-f
54Do not sort (should also be: treat a file as a directory, but that
55can't be implemented portably).
56.TP
57.B \-g
58Suppress the owner name on a long listing (implies
59.BR \-l ).
60.TP
61.B \-h
62Show file sizes in kilo, mega or gigabytes.
63.TP
64.B \-i
65I-node number printed in the first column.
66.TP
67.B \-l
68Long listing: mode, links, owner, group, size and time.
69.RB ( "ls \-lC"
70uses columns in a wide enough window!)
71.TP
72.B \-n
73Print numerical user and group id's.
74.TP
75.B \-p
76Mark directories with a '\fB/\fP'.
77.TP
78.B \-q
79Print nongraphic characters as '\fB?\fP' (default on terminals).
80.TP
81.B \-r
82Reverse the sort order.
83.TP
84.B \-s
85Give the size in kilobytes in the first
86.RB ( \-s )
87or second column
88.RB ( \-is ).
89.TP
90.B \-t
91Sort by time (modified time default), latest first.
92.TP
93.B \-u
94Use last accessed time for sorting, listing or searching.
95.TP
96.B \-1
97Print in one column.
98.TP
99.B \-A
100List all entries, but not
101.B .
102and
103.B ..
104(This is the default for privileged users.)
105.TP
106.B \-C
107Print multicolumn (default on terminals).
108.TP
109.B \-D
110Distinguish files by type, i.e. regular files together, directories
111together, etc.
112.TP
113.B \-F
114Mark directories with a '\fB/\fP', executables with a '\fB*\fP', \s-2UNIX\s+2
115domain sockets with a '\fB=\fP', named pipes with a '\fB|\fP' and symbolic
116links with a '\fB@\fP' behind the name.
117.TP
118.B \-L
119Print the file referenced by a symbolic link instead of the link.
120.TP
121.B \-M
122List mode before name (implies
123.BR \-C ).
124.TP
125.B \-R
126List directory trees recursively.
127.TP
128.B \-T
129Print file times in a long format, e.g. "Oct 24 21:37:41 1996".
130.TP
131.B \-X
132Print crunched mode and size before name (implies
133.BR \-C ).
134Only the rwx permissions that its caller has on the file are shown, but they
135are in upper case if the caller owns the file and has given the permission
136to the callers group or other users. The size is listed in bytes (<= 5K),
137or rounded up kilo, mega or gigabytes.
138.SH "SEE ALSO"
139.BR du (1),
140.BR stat (1),
141.BR stat (2).
142.SH BUGS
143Having to type
144.B ls \-C
145when viewing files through
146.BR more (1).
147.PP
148Is only portable to systems with the same
149.B st_mode
150(see
151.BR stat (2)).
152.PP
153The
154.B LSOPTS
155variable and the
156.BR -D ,
157.B -M
158and
159.B -X
160flags are not found on other
161.B ls
162implementations. (They have their own nonstandard flags.)
163.SH AUTHOR
164Kees J. Bot <kjb@cs.vu.nl>
Note: See TracBrowser for help on using the repository browser.