xref: /minix3/bin/ls/ls.1 (revision 7377a594e4aadf10d5bcbc0a70c8515160715364)
1*7377a594SSevan Janiyan.\"	$NetBSD: ls.1,v 1.79 2016/08/10 17:45:12 sevan Exp $
2b7ef8cfbSLionel Sambuc.\"
3b7ef8cfbSLionel Sambuc.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
4b7ef8cfbSLionel Sambuc.\"	The Regents of the University of California.  All rights reserved.
5b7ef8cfbSLionel Sambuc.\"
6b7ef8cfbSLionel Sambuc.\" This code is derived from software contributed to Berkeley by
7b7ef8cfbSLionel Sambuc.\" the Institute of Electrical and Electronics Engineers, Inc.
8b7ef8cfbSLionel Sambuc.\"
9b7ef8cfbSLionel Sambuc.\" Redistribution and use in source and binary forms, with or without
10b7ef8cfbSLionel Sambuc.\" modification, are permitted provided that the following conditions
11b7ef8cfbSLionel Sambuc.\" are met:
12b7ef8cfbSLionel Sambuc.\" 1. Redistributions of source code must retain the above copyright
13b7ef8cfbSLionel Sambuc.\"    notice, this list of conditions and the following disclaimer.
14b7ef8cfbSLionel Sambuc.\" 2. Redistributions in binary form must reproduce the above copyright
15b7ef8cfbSLionel Sambuc.\"    notice, this list of conditions and the following disclaimer in the
16b7ef8cfbSLionel Sambuc.\"    documentation and/or other materials provided with the distribution.
17b7ef8cfbSLionel Sambuc.\" 3. Neither the name of the University nor the names of its contributors
18b7ef8cfbSLionel Sambuc.\"    may be used to endorse or promote products derived from this software
19b7ef8cfbSLionel Sambuc.\"    without specific prior written permission.
20b7ef8cfbSLionel Sambuc.\"
21b7ef8cfbSLionel Sambuc.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22b7ef8cfbSLionel Sambuc.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23b7ef8cfbSLionel Sambuc.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24b7ef8cfbSLionel Sambuc.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25b7ef8cfbSLionel Sambuc.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26b7ef8cfbSLionel Sambuc.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27b7ef8cfbSLionel Sambuc.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28b7ef8cfbSLionel Sambuc.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29b7ef8cfbSLionel Sambuc.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30b7ef8cfbSLionel Sambuc.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31b7ef8cfbSLionel Sambuc.\" SUCH DAMAGE.
32b7ef8cfbSLionel Sambuc.\"
33b7ef8cfbSLionel Sambuc.\"     @(#)ls.1	8.7 (Berkeley) 7/29/94
34b7ef8cfbSLionel Sambuc.\"
35*7377a594SSevan Janiyan.Dd August 10, 2016
36b7ef8cfbSLionel Sambuc.Dt LS 1
37b7ef8cfbSLionel Sambuc.Os
38b7ef8cfbSLionel Sambuc.Sh NAME
39b7ef8cfbSLionel Sambuc.Nm ls
40b7ef8cfbSLionel Sambuc.Nd list directory contents
41b7ef8cfbSLionel Sambuc.Sh SYNOPSIS
42b7ef8cfbSLionel Sambuc.Nm
430a6a1f1dSLionel Sambuc.Op Fl 1AaBbCcdFfghikLlMmnOoPpqRrSsTtuWwXx
44b7ef8cfbSLionel Sambuc.Op Ar
45b7ef8cfbSLionel Sambuc.Sh DESCRIPTION
4684d9c625SLionel SambucFor each
47b7ef8cfbSLionel Sambuc.Ar file
4884d9c625SLionel Sambucoperand that names a file of a type other than
49b7ef8cfbSLionel Sambucdirectory,
50b7ef8cfbSLionel Sambuc.Nm
51b7ef8cfbSLionel Sambucdisplays its name as well as any requested,
52b7ef8cfbSLionel Sambucassociated information.
5384d9c625SLionel SambucFor each
54b7ef8cfbSLionel Sambuc.Ar file
5584d9c625SLionel Sambucoperand that names a file of type directory,
56b7ef8cfbSLionel Sambuc.Nm
57b7ef8cfbSLionel Sambucdisplays the names of files contained
58b7ef8cfbSLionel Sambucwithin that directory, as well as any requested, associated
59b7ef8cfbSLionel Sambucinformation.
60b7ef8cfbSLionel Sambuc.Pp
61b7ef8cfbSLionel SambucIf no operands are given, the contents of the current
62b7ef8cfbSLionel Sambucdirectory are displayed.
63b7ef8cfbSLionel SambucIf more than one operand is given,
64b7ef8cfbSLionel Sambucnon-directory operands are displayed first; directory
65b7ef8cfbSLionel Sambucand non-directory operands are sorted separately and in
66b7ef8cfbSLionel Sambuclexicographical order.
67b7ef8cfbSLionel Sambuc.Pp
68b7ef8cfbSLionel SambucThe following options are available:
69b7ef8cfbSLionel Sambuc.Bl -tag -width indent
7084d9c625SLionel Sambuc.It Fl \&1
7184d9c625SLionel Sambuc(The numeric digit
7284d9c625SLionel Sambuc.Dq one ) .
7384d9c625SLionel SambucForce output to be one entry per line.
7484d9c625SLionel SambucThis is the default when output is not to a terminal.
75b7ef8cfbSLionel Sambuc.It Fl A
76b7ef8cfbSLionel SambucList all entries except for
77b7ef8cfbSLionel Sambuc.Ql \&.
78b7ef8cfbSLionel Sambucand
79b7ef8cfbSLionel Sambuc.Ql \&.. .
80b7ef8cfbSLionel SambucAlways set for the super-user.
81b7ef8cfbSLionel Sambuc.It Fl a
82b7ef8cfbSLionel SambucInclude directory entries whose names begin with a
83b7ef8cfbSLionel Sambucdot
84b7ef8cfbSLionel Sambuc.Pq Sq \&. .
85b7ef8cfbSLionel Sambuc.It Fl B
86b7ef8cfbSLionel SambucForce printing of non-graphic characters in file names as \exxx, where xxx
87b7ef8cfbSLionel Sambucis the numeric value of the character in octal.
88b7ef8cfbSLionel Sambuc.It Fl b
89b7ef8cfbSLionel SambucAs
90b7ef8cfbSLionel Sambuc.Fl B ,
91b7ef8cfbSLionel Sambucbut use C escape codes whenever possible.
92b7ef8cfbSLionel Sambuc.It Fl C
93b7ef8cfbSLionel SambucForce multi-column output; this is the default when output is to a terminal.
94b7ef8cfbSLionel Sambuc.It Fl c
95b7ef8cfbSLionel SambucUse time when file status was last changed,
9684d9c625SLionel Sambucinstead of time of last modification of the file for printing
9784d9c625SLionel Sambuc.Pq Fl l
9884d9c625SLionel Sambucor sorting
9984d9c625SLionel Sambuc.Pq Fl t .
10084d9c625SLionel SambucOverrides
10184d9c625SLionel Sambuc.Fl u .
102b7ef8cfbSLionel Sambuc.It Fl d
103b7ef8cfbSLionel SambucDirectories are listed as plain files (not searched recursively) and
104b7ef8cfbSLionel Sambucsymbolic links in the argument list are not followed.
10584d9c625SLionel SambucTurns off
10684d9c625SLionel Sambuc.Fl R
10784d9c625SLionel Sambucif also given.
108b7ef8cfbSLionel Sambuc.It Fl F
109b7ef8cfbSLionel SambucDisplay a slash
110b7ef8cfbSLionel Sambuc.Pq Sq \&/
111b7ef8cfbSLionel Sambucimmediately after each pathname that is a directory,
112b7ef8cfbSLionel Sambucan asterisk
113b7ef8cfbSLionel Sambuc.Pq Sq \&*
114b7ef8cfbSLionel Sambucafter each that is executable,
115b7ef8cfbSLionel Sambucan at sign
116b7ef8cfbSLionel Sambuc.Pq Sq \&@
117b7ef8cfbSLionel Sambucafter each symbolic link,
118b7ef8cfbSLionel Sambuca percent sign
119b7ef8cfbSLionel Sambuc.Pq Sq \&%
120b7ef8cfbSLionel Sambucafter each whiteout,
121b7ef8cfbSLionel Sambucan equal sign
122b7ef8cfbSLionel Sambuc.Pq Sq \&=
123b7ef8cfbSLionel Sambucafter each socket,
124b7ef8cfbSLionel Sambucand a vertical bar
125b7ef8cfbSLionel Sambuc.Pq Sq \&|
126b7ef8cfbSLionel Sambucafter each that is a
127b7ef8cfbSLionel Sambuc.Tn FIFO .
128b7ef8cfbSLionel Sambuc.It Fl f
129b7ef8cfbSLionel SambucOutput is not sorted.
1300a6a1f1dSLionel SambucThis option implies
1310a6a1f1dSLionel Sambuc.Fl a .
132b7ef8cfbSLionel Sambuc.It Fl g
133b7ef8cfbSLionel SambucThe same as
134b7ef8cfbSLionel Sambuc.Fl l ,
135b7ef8cfbSLionel Sambucexcept that the owner is not printed.
136b7ef8cfbSLionel Sambuc.It Fl h
137b7ef8cfbSLionel SambucModifies the
138b7ef8cfbSLionel Sambuc.Fl l
13984d9c625SLionel Sambucand
14084d9c625SLionel Sambuc.Fl s
141b7ef8cfbSLionel Sambucoptions, causing the sizes to be reported in bytes displayed in a human
142b7ef8cfbSLionel Sambucreadable format.
143b7ef8cfbSLionel SambucOverrides
144b7ef8cfbSLionel Sambuc.Fl k
145b7ef8cfbSLionel Sambucand
146b7ef8cfbSLionel Sambuc.Fl M .
147b7ef8cfbSLionel Sambuc.It Fl i
148b7ef8cfbSLionel SambucFor each file, print the file's file serial number (inode number).
149b7ef8cfbSLionel Sambuc.It Fl k
150b7ef8cfbSLionel SambucModifies the
151b7ef8cfbSLionel Sambuc.Fl s
152b7ef8cfbSLionel Sambucoption, causing the sizes to be reported in kilobytes.
15384d9c625SLionel SambucOverrides
15484d9c625SLionel Sambuc.Fl h .
155b7ef8cfbSLionel Sambuc.It Fl L
156b7ef8cfbSLionel SambucFor each file, if it's a link, evaluate file information and file type
157b7ef8cfbSLionel Sambucof the referenced file and not the link itself; however still print
158b7ef8cfbSLionel Sambucthe link name, unless used with
159b7ef8cfbSLionel Sambuc.Fl l ,
160b7ef8cfbSLionel Sambucfor example.
161b7ef8cfbSLionel Sambuc.It Fl l
162b7ef8cfbSLionel Sambuc(The lowercase letter
163b7ef8cfbSLionel Sambuc.Dq ell ) .
164b7ef8cfbSLionel SambucList in long format.
165b7ef8cfbSLionel Sambuc(See below.)
166b7ef8cfbSLionel Sambuc.It Fl M
167b7ef8cfbSLionel SambucModifies the
168b7ef8cfbSLionel Sambuc.Fl l
169b7ef8cfbSLionel Sambucand
170b7ef8cfbSLionel Sambuc.Fl s
171b7ef8cfbSLionel Sambucoptions, causing the sizes or block counts reported to be separated with
172b7ef8cfbSLionel Sambuccommas (or a locale appropriate separator) resulting in a more readable
173b7ef8cfbSLionel Sambucoutput.
174b7ef8cfbSLionel SambucOverrides
17584d9c625SLionel Sambuc.Fl h ;
17684d9c625SLionel Sambucdoes not override
177b7ef8cfbSLionel Sambuc.Fl k .
178b7ef8cfbSLionel Sambuc.It Fl m
179b7ef8cfbSLionel SambucStream output format; list files across the page, separated by commas.
180b7ef8cfbSLionel Sambuc.It Fl n
181b7ef8cfbSLionel SambucThe same as
182b7ef8cfbSLionel Sambuc.Fl l ,
183b7ef8cfbSLionel Sambucexcept that
184b7ef8cfbSLionel Sambucthe owner and group IDs are displayed numerically rather than converting
185b7ef8cfbSLionel Sambucto a owner or group name.
1860a6a1f1dSLionel Sambuc.It Fl O
1870a6a1f1dSLionel SambucOutput only leaf files (not directories), eliding other
1880a6a1f1dSLionel Sambuc.Nm
1890a6a1f1dSLionel Sambucoutput.
190b7ef8cfbSLionel Sambuc.It Fl o
191b7ef8cfbSLionel SambucInclude the file flags in a long
192b7ef8cfbSLionel Sambuc.Pq Fl l
193b7ef8cfbSLionel Sambucoutput.
194b7ef8cfbSLionel SambucIf no file flags are set,
195b7ef8cfbSLionel Sambuc.Dq -
196b7ef8cfbSLionel Sambucis displayed.
197b7ef8cfbSLionel Sambuc(See
198b7ef8cfbSLionel Sambuc.Xr chflags 1
199b7ef8cfbSLionel Sambucfor a list of possible flags and their meanings.)
2000a6a1f1dSLionel Sambuc.It Fl P
2010a6a1f1dSLionel SambucPrint the full pathname for each file.
202b7ef8cfbSLionel Sambuc.It Fl p
203b7ef8cfbSLionel SambucDisplay a slash
204b7ef8cfbSLionel Sambuc.Pq Sq \&/
205b7ef8cfbSLionel Sambucimmediately after each pathname that is a directory.
206b7ef8cfbSLionel Sambuc.It Fl q
207b7ef8cfbSLionel SambucForce printing of non-printable characters in file names as
208b7ef8cfbSLionel Sambucthe character
209b7ef8cfbSLionel Sambuc.Sq \&? ;
210b7ef8cfbSLionel Sambucthis is the default when output is to a terminal.
211b7ef8cfbSLionel Sambuc.It Fl R
212b7ef8cfbSLionel SambucRecursively list subdirectories encountered.
21384d9c625SLionel SambucSee also
21484d9c625SLionel Sambuc.Fl d .
215b7ef8cfbSLionel Sambuc.It Fl r
216b7ef8cfbSLionel SambucReverse the order of the sort to get reverse
217b7ef8cfbSLionel Sambuclexicographical order or the smallest or oldest entries first.
218b7ef8cfbSLionel Sambuc.It Fl S
219b7ef8cfbSLionel SambucSort by size, largest file first.
220b7ef8cfbSLionel Sambuc.It Fl s
221b7ef8cfbSLionel SambucDisplay the number of file system blocks actually used by each file, in units
222b7ef8cfbSLionel Sambucof 512 bytes or
223b7ef8cfbSLionel Sambuc.Ev BLOCKSIZE
224b7ef8cfbSLionel Sambuc(see
225b7ef8cfbSLionel Sambuc.Sx ENVIRONMENT )
226b7ef8cfbSLionel Sambucwhere partial units are rounded up to the
227b7ef8cfbSLionel Sambucnext integer value.
228b7ef8cfbSLionel SambucIf the output is to a terminal, a total sum for all the file
229b7ef8cfbSLionel Sambucsizes is output on a line before the listing.
230b7ef8cfbSLionel Sambuc.It Fl T
231b7ef8cfbSLionel SambucWhen used with the
232b7ef8cfbSLionel Sambuc.Fl l
233b7ef8cfbSLionel Sambuc(the lowercase letter
234b7ef8cfbSLionel Sambuc.Dq ell )
235b7ef8cfbSLionel Sambucoption, display complete time information for the file, including
236b7ef8cfbSLionel Sambucmonth, day, hour, minute, second, and year.
237b7ef8cfbSLionel Sambuc.It Fl t
238b7ef8cfbSLionel SambucSort by time modified (most recently modified
239b7ef8cfbSLionel Sambucfirst) before sorting the operands by lexicographical
240b7ef8cfbSLionel Sambucorder.
241b7ef8cfbSLionel Sambuc.It Fl u
242b7ef8cfbSLionel SambucUse time of last access,
243b7ef8cfbSLionel Sambucinstead of last modification
24484d9c625SLionel Sambucof the file for printing
24584d9c625SLionel Sambuc.Pq Fl l
24684d9c625SLionel Sambucor sorting
24784d9c625SLionel Sambuc.Pq Fl t .
24884d9c625SLionel SambucOverrides
24984d9c625SLionel Sambuc.Fl c .
250b7ef8cfbSLionel Sambuc.It Fl W
251b7ef8cfbSLionel SambucDisplay whiteouts when scanning directories.
252b7ef8cfbSLionel Sambuc.It Fl w
253b7ef8cfbSLionel SambucForce raw printing of non-printable characters.
254b7ef8cfbSLionel SambucThis is the default when output is not to a terminal.
255b7ef8cfbSLionel Sambuc.It Fl x
256b7ef8cfbSLionel SambucMulti-column output sorted across the page rather than down the page.
2570a6a1f1dSLionel Sambuc.It Fl X
2580a6a1f1dSLionel SambucDon't cross mount points when recursing.
259b7ef8cfbSLionel Sambuc.El
260b7ef8cfbSLionel Sambuc.Pp
261b7ef8cfbSLionel SambucThe
262b7ef8cfbSLionel Sambuc.Fl B ,
263b7ef8cfbSLionel Sambuc.Fl b ,
26484d9c625SLionel Sambuc.Fl q ,
265b7ef8cfbSLionel Sambucand
26684d9c625SLionel Sambuc.Fl w
267b7ef8cfbSLionel Sambucoptions all override each other; the last one specified determines
268b7ef8cfbSLionel Sambucthe format used for non-printable characters.
269b7ef8cfbSLionel Sambuc.Pp
270b7ef8cfbSLionel SambucThe
271b7ef8cfbSLionel Sambuc.Fl 1 ,
272b7ef8cfbSLionel Sambuc.Fl C ,
273b7ef8cfbSLionel Sambuc.Fl g ,
274b7ef8cfbSLionel Sambuc.Fl l ,
275b7ef8cfbSLionel Sambuc.Fl m ,
276b7ef8cfbSLionel Sambucand
277b7ef8cfbSLionel Sambuc.Fl x
278b7ef8cfbSLionel Sambucoptions all override each other; the last one specified determines
279b7ef8cfbSLionel Sambucthe format used with the exception that if both
280b7ef8cfbSLionel Sambuc.Fl l
281b7ef8cfbSLionel Sambucand
282b7ef8cfbSLionel Sambuc.Fl g
283b7ef8cfbSLionel Sambucare specified,
284b7ef8cfbSLionel Sambuc.Fl l
285b7ef8cfbSLionel Sambucwill always override
286b7ef8cfbSLionel Sambuc.Fl g ,
287b7ef8cfbSLionel Sambuceven if
288b7ef8cfbSLionel Sambuc.Fl g
289b7ef8cfbSLionel Sambucwas specified last.
290b7ef8cfbSLionel Sambuc.Pp
291b7ef8cfbSLionel SambucBy default,
292b7ef8cfbSLionel Sambuc.Nm
293b7ef8cfbSLionel Sambuclists one entry per line to standard
294b7ef8cfbSLionel Sambucoutput; the exceptions are to terminals or when the
295b7ef8cfbSLionel Sambuc.Fl C
296b7ef8cfbSLionel Sambucor
297b7ef8cfbSLionel Sambuc.Fl m
298b7ef8cfbSLionel Sambucoptions are specified.
299b7ef8cfbSLionel Sambuc.Pp
300b7ef8cfbSLionel SambucFile information is displayed with one or more
301b7ef8cfbSLionel Sambuc.Aq blank
30284d9c625SLionel Sambuccharacters separating the information associated with the
303b7ef8cfbSLionel Sambuc.Fl i ,
30484d9c625SLionel Sambuc.Fl l ,
305b7ef8cfbSLionel Sambucand
30684d9c625SLionel Sambuc.Fl s
307b7ef8cfbSLionel Sambucoptions.
308b7ef8cfbSLionel Sambuc.Ss The Long Format
309b7ef8cfbSLionel SambucIf the
310b7ef8cfbSLionel Sambuc.Fl l
311b7ef8cfbSLionel Sambucoption is given, the following information
312b7ef8cfbSLionel Sambucis displayed for each file:
313b7ef8cfbSLionel Sambuc.Bl -item -offset indent -compact
314b7ef8cfbSLionel Sambuc.It
315b7ef8cfbSLionel Sambucfile mode
316b7ef8cfbSLionel Sambuc.It
317b7ef8cfbSLionel Sambucnumber of links
318b7ef8cfbSLionel Sambuc.It
319b7ef8cfbSLionel Sambucowner name
320b7ef8cfbSLionel Sambuc.It
321b7ef8cfbSLionel Sambucgroup name
322b7ef8cfbSLionel Sambuc.It
323b7ef8cfbSLionel Sambucfile flags (if
324b7ef8cfbSLionel Sambuc.Fl o
325b7ef8cfbSLionel Sambucgiven)
326b7ef8cfbSLionel Sambuc.It
327b7ef8cfbSLionel Sambucnumber of bytes in the file
328b7ef8cfbSLionel Sambuc.It
329b7ef8cfbSLionel Sambucabbreviated month file was last modified
330b7ef8cfbSLionel Sambuc.It
331b7ef8cfbSLionel Sambucday-of-month file was last modified
332b7ef8cfbSLionel Sambuc.It
333b7ef8cfbSLionel Sambuchour and minute file was last modified
334b7ef8cfbSLionel Sambuc.It
335b7ef8cfbSLionel Sambucpathname
336b7ef8cfbSLionel Sambuc.El
337b7ef8cfbSLionel Sambuc.Pp
338b7ef8cfbSLionel SambucIn addition, for each directory whose contents are displayed, the total
33984d9c625SLionel Sambucnumber of file system blocks in units of 512 bytes or
34084d9c625SLionel Sambuc.Ev BLOCKSIZE
34184d9c625SLionel Sambuc(see
34284d9c625SLionel Sambuc.Sx ENVIRONMENT )
34384d9c625SLionel Sambucused by the files in the directory is displayed on a line by itself
34484d9c625SLionel Sambucimmediately before the information for the files in the directory.
345b7ef8cfbSLionel Sambuc.Pp
346b7ef8cfbSLionel SambucIf the owner or group names are not a known owner or group name,
347b7ef8cfbSLionel Sambucor the
348b7ef8cfbSLionel Sambuc.Fl n
349b7ef8cfbSLionel Sambucoption is given,
350b7ef8cfbSLionel Sambucthe numeric ID's are displayed.
351b7ef8cfbSLionel Sambuc.Pp
352b7ef8cfbSLionel SambucIf the file is a character special or block special file,
353b7ef8cfbSLionel Sambucthe major and minor device numbers for the file are displayed
354b7ef8cfbSLionel Sambucin the size field.
355b7ef8cfbSLionel SambucIf the file is a symbolic link the pathname of the
356b7ef8cfbSLionel Sambuclinked-to file is preceded by
357b7ef8cfbSLionel Sambuc.Dq \-\*[Gt] .
358b7ef8cfbSLionel Sambuc.Pp
359b7ef8cfbSLionel SambucThe file mode printed under the
360b7ef8cfbSLionel Sambuc.Fl l
361b7ef8cfbSLionel Sambucoption consists of the entry type, owner permissions, group
362b7ef8cfbSLionel Sambucpermissions, and other permissions.
363b7ef8cfbSLionel SambucThe entry type character describes the type of file, as
364b7ef8cfbSLionel Sambucfollows:
365b7ef8cfbSLionel Sambuc.Pp
366b7ef8cfbSLionel Sambuc.Bl -tag -width 4n -offset indent -compact
36784d9c625SLionel Sambuc.It Sy \-
36884d9c625SLionel SambucRegular file.
369b7ef8cfbSLionel Sambuc.It Sy a
370b7ef8cfbSLionel SambucArchive state 1.
371b7ef8cfbSLionel Sambuc.It Sy A
372b7ef8cfbSLionel SambucArchive state 2.
373b7ef8cfbSLionel Sambuc.It Sy b
374b7ef8cfbSLionel SambucBlock special file.
375b7ef8cfbSLionel Sambuc.It Sy c
376b7ef8cfbSLionel SambucCharacter special file.
377b7ef8cfbSLionel Sambuc.It Sy d
378b7ef8cfbSLionel SambucDirectory.
379b7ef8cfbSLionel Sambuc.It Sy l
380b7ef8cfbSLionel SambucSymbolic link.
381b7ef8cfbSLionel Sambuc.It Sy p
382b7ef8cfbSLionel SambucFIFO.
38384d9c625SLionel Sambuc.It Sy s
38484d9c625SLionel SambucSocket link.
385b7ef8cfbSLionel Sambuc.It Sy w
386b7ef8cfbSLionel SambucWhiteout.
387b7ef8cfbSLionel Sambuc.El
388b7ef8cfbSLionel Sambuc.Pp
389b7ef8cfbSLionel SambucThe next three fields
390b7ef8cfbSLionel Sambucare three characters each:
391b7ef8cfbSLionel Sambucowner permissions,
392b7ef8cfbSLionel Sambucgroup permissions, and
393b7ef8cfbSLionel Sambucother permissions.
394b7ef8cfbSLionel SambucEach field has three character positions:
395b7ef8cfbSLionel Sambuc.Bl -enum -offset indent
396b7ef8cfbSLionel Sambuc.It
397b7ef8cfbSLionel SambucIf
398b7ef8cfbSLionel Sambuc.Sy r ,
399b7ef8cfbSLionel Sambucthe file is readable; if
400b7ef8cfbSLionel Sambuc.Sy \- ,
401b7ef8cfbSLionel Sambucit is not readable.
402b7ef8cfbSLionel Sambuc.It
403b7ef8cfbSLionel SambucIf
404b7ef8cfbSLionel Sambuc.Sy w ,
405b7ef8cfbSLionel Sambucthe file is writable; if
406b7ef8cfbSLionel Sambuc.Sy \- ,
407b7ef8cfbSLionel Sambucit is not writable.
408b7ef8cfbSLionel Sambuc.It
409b7ef8cfbSLionel SambucThe first of the following that applies:
410b7ef8cfbSLionel Sambuc.Bl -tag -width 4n -offset indent
411b7ef8cfbSLionel Sambuc.It Sy S
412b7ef8cfbSLionel SambucIf in the owner permissions, the file is not executable and
413b7ef8cfbSLionel Sambucset-user-ID mode is set.
414b7ef8cfbSLionel SambucIf in the group permissions, the file is not executable
415b7ef8cfbSLionel Sambucand set-group-ID mode is set.
416b7ef8cfbSLionel Sambuc.It Sy s
417b7ef8cfbSLionel SambucIf in the owner permissions, the file is executable
418b7ef8cfbSLionel Sambucand set-user-ID mode is set.
419b7ef8cfbSLionel SambucIf in the group permissions, the file is executable
420b7ef8cfbSLionel Sambucand setgroup-ID mode is set.
421b7ef8cfbSLionel Sambuc.It Sy x
422b7ef8cfbSLionel SambucThe file is executable or the directory is
423b7ef8cfbSLionel Sambucsearchable.
424b7ef8cfbSLionel Sambuc.It Sy \-
425b7ef8cfbSLionel SambucThe file is neither readable, writable, executable,
426b7ef8cfbSLionel Sambucnor set-user-ID nor set-group-ID mode, nor sticky.
427b7ef8cfbSLionel Sambuc(See below.)
428b7ef8cfbSLionel Sambuc.El
429b7ef8cfbSLionel Sambuc.Pp
430b7ef8cfbSLionel SambucThese next two apply only to the third character in the last group
431b7ef8cfbSLionel Sambuc(other permissions).
432b7ef8cfbSLionel Sambuc.Bl -tag -width 4n -offset indent
433b7ef8cfbSLionel Sambuc.It Sy T
434b7ef8cfbSLionel SambucThe sticky bit is set
435b7ef8cfbSLionel Sambuc(mode
436b7ef8cfbSLionel Sambuc.Li 1000 ) ,
437b7ef8cfbSLionel Sambucbut not execute or search permission.
438b7ef8cfbSLionel Sambuc(See
439b7ef8cfbSLionel Sambuc.Xr chmod 1
440b7ef8cfbSLionel Sambucor
441b7ef8cfbSLionel Sambuc.Xr sticky 7 . )
442b7ef8cfbSLionel Sambuc.It Sy t
443b7ef8cfbSLionel SambucThe sticky bit is set (mode
444b7ef8cfbSLionel Sambuc.Li 1000 ) ,
445b7ef8cfbSLionel Sambucand is searchable or executable.
446b7ef8cfbSLionel Sambuc(See
447b7ef8cfbSLionel Sambuc.Xr chmod 1
448b7ef8cfbSLionel Sambucor
449b7ef8cfbSLionel Sambuc.Xr sticky 7 . )
450b7ef8cfbSLionel Sambuc.El
451b7ef8cfbSLionel Sambuc.El
452b7ef8cfbSLionel Sambuc.Pp
453b7ef8cfbSLionel SambucThe number of bytes displayed for a directory is a function of the
454b7ef8cfbSLionel Sambucnumber of
455b7ef8cfbSLionel Sambuc.Xr dirent 3
456b7ef8cfbSLionel Sambucstructures in the directory, not all of which may be allocated to
457b7ef8cfbSLionel Sambucany existing file.
458b7ef8cfbSLionel Sambuc.Sh ENVIRONMENT
459b7ef8cfbSLionel SambucThe following environment variables affect the execution of
460b7ef8cfbSLionel Sambuc.Nm :
461b7ef8cfbSLionel Sambuc.Bl -tag -width BLOCKSIZE
462b7ef8cfbSLionel Sambuc.It Ev BLOCKSIZE
463b7ef8cfbSLionel SambucIf the environment variable
464b7ef8cfbSLionel Sambuc.Ev BLOCKSIZE
465b7ef8cfbSLionel Sambucis set, and the
466b7ef8cfbSLionel Sambuc.Fl k
46784d9c625SLionel Sambucoption is not specified, the block counts
468b7ef8cfbSLionel Sambuc(see
46984d9c625SLionel Sambuc.Fl l
47084d9c625SLionel Sambucand
471b7ef8cfbSLionel Sambuc.Fl s )
472b7ef8cfbSLionel Sambucwill be displayed in units of that size block.
473b7ef8cfbSLionel Sambuc.It Ev COLUMNS
474b7ef8cfbSLionel SambucIf this variable contains a string representing a
475b7ef8cfbSLionel Sambucdecimal integer, it is used as the
476b7ef8cfbSLionel Sambuccolumn position width for displaying
477b7ef8cfbSLionel Sambucmultiple-text-column output.
478b7ef8cfbSLionel SambucThe
479b7ef8cfbSLionel Sambuc.Nm
480b7ef8cfbSLionel Sambucutility calculates how
481b7ef8cfbSLionel Sambucmany pathname text columns to display
482b7ef8cfbSLionel Sambucbased on the width provided.
483b7ef8cfbSLionel Sambuc(See
484b7ef8cfbSLionel Sambuc.Fl C . )
485b7ef8cfbSLionel Sambuc.It Ev TZ
486b7ef8cfbSLionel SambucThe timezone to use when displaying dates.
487b7ef8cfbSLionel SambucSee
488b7ef8cfbSLionel Sambuc.Xr environ 7
489b7ef8cfbSLionel Sambucfor more information.
490b7ef8cfbSLionel Sambuc.El
491b7ef8cfbSLionel Sambuc.Sh EXIT STATUS
492b7ef8cfbSLionel Sambuc.Ex -std
493b7ef8cfbSLionel Sambuc.Sh COMPATIBILITY
494b7ef8cfbSLionel SambucThe group field is now automatically included in the long listing for
495b7ef8cfbSLionel Sambucfiles in order to be compatible with the
496b7ef8cfbSLionel Sambuc.St -p1003.2
497b7ef8cfbSLionel Sambucspecification.
498b7ef8cfbSLionel Sambuc.Sh SEE ALSO
499b7ef8cfbSLionel Sambuc.Xr chflags 1 ,
500b7ef8cfbSLionel Sambuc.Xr chmod 1 ,
501b7ef8cfbSLionel Sambuc.Xr stat 2 ,
502b7ef8cfbSLionel Sambuc.Xr dirent 3 ,
503b7ef8cfbSLionel Sambuc.Xr getbsize 3 ,
504b7ef8cfbSLionel Sambuc.Xr sticky 7 ,
505b7ef8cfbSLionel Sambuc.Xr symlink 7
506b7ef8cfbSLionel Sambuc.Sh STANDARDS
507b7ef8cfbSLionel SambucThe
508b7ef8cfbSLionel Sambuc.Nm
509b7ef8cfbSLionel Sambucutility is expected to be a superset of the
510b7ef8cfbSLionel Sambuc.St -p1003.2
511b7ef8cfbSLionel Sambucspecification.
512b7ef8cfbSLionel Sambuc.Sh HISTORY
513b7ef8cfbSLionel SambucAn
514b7ef8cfbSLionel Sambuc.Nm
515b7ef8cfbSLionel Sambucutility appeared in
516*7377a594SSevan Janiyan.At v1 .
517