2015-03-27 16:22:48 +00:00
|
|
|
.Dd March 27, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt LS 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-20 16:50:37 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ls
|
|
|
|
.Nd list directory contents
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 20:17:58 +00:00
|
|
|
.Nm
|
2015-03-27 16:22:48 +00:00
|
|
|
.Op Fl iqr
|
|
|
|
.Op Fl ln
|
|
|
|
.Op Fl A | a
|
|
|
|
.Op Fl 1
|
|
|
|
.Op Fl h | F | p
|
|
|
|
.Op Fl H | L
|
|
|
|
.Op Fl R | d
|
|
|
|
.Op Fl S | f | t | U
|
|
|
|
.Op Fl c | u
|
2015-01-20 16:50:37 +00:00
|
|
|
.Op Ar file ...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-01-31 13:43:27 +00:00
|
|
|
lists each given file, and the contents of each given directory. If no files
|
2011-05-26 03:01:20 +00:00
|
|
|
are given the current directory is listed.
|
2015-01-20 16:50:37 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
2015-02-21 09:30:08 +00:00
|
|
|
.It Fl A
|
|
|
|
List all entries except for '.' and '..'.
|
2015-01-20 16:50:37 +00:00
|
|
|
.It Fl a
|
|
|
|
Show hidden files (those beginning with '.').
|
|
|
|
.It Fl c
|
|
|
|
Use time file's status was last changed instead of last
|
|
|
|
modification time for sorting or printing.
|
|
|
|
.It Fl d
|
|
|
|
List directories themselves, not their contents.
|
|
|
|
.It Fl F
|
2015-02-19 18:48:15 +00:00
|
|
|
Append a file type indicator to all special files.
|
2015-03-18 18:26:42 +00:00
|
|
|
.It Fl f
|
|
|
|
Like
|
|
|
|
.Fl U
|
|
|
|
but turns on
|
|
|
|
.Fl a
|
|
|
|
and disables
|
|
|
|
.Fl r ,
|
|
|
|
.Fl S
|
|
|
|
and
|
|
|
|
.Fl t .
|
2015-01-20 16:50:37 +00:00
|
|
|
.It Fl H
|
|
|
|
List information about the targets of symbolic links specified on the command
|
2014-12-08 01:33:52 +00:00
|
|
|
line instead of the links themselves.
|
2015-01-20 16:50:37 +00:00
|
|
|
.It Fl h
|
|
|
|
Show filesizes in human\-readable format.
|
|
|
|
.It Fl i
|
|
|
|
Print the index number of each file.
|
|
|
|
.It Fl L
|
|
|
|
List information about the targets of symbolic links instead of the links
|
2014-12-08 01:33:52 +00:00
|
|
|
themselves.
|
2015-01-20 16:50:37 +00:00
|
|
|
.It Fl l
|
|
|
|
List detailed information about each file, including their type, permissions,
|
2015-10-04 11:10:28 +00:00
|
|
|
links, owner, group, size or major and minor numbers if the file is a
|
|
|
|
character/block device, and last file status/modification time.
|
2015-02-22 11:55:38 +00:00
|
|
|
.It Fl n
|
|
|
|
List detailed information about each file, including their type, permissions,
|
2015-10-04 11:10:28 +00:00
|
|
|
links, owner, group, size or major and minor numbers if the file is a
|
|
|
|
character/block device, and last file status/modification time, but with
|
2015-02-22 11:55:38 +00:00
|
|
|
numeric IDs.
|
2015-02-19 18:48:15 +00:00
|
|
|
.It Fl p
|
|
|
|
Append a file type indicator to directories.
|
2015-02-17 17:59:01 +00:00
|
|
|
.It Fl q
|
|
|
|
Replace non-printable characters in filenames with '?'.
|
2015-02-21 10:45:15 +00:00
|
|
|
.It Fl R
|
2015-02-21 11:47:37 +00:00
|
|
|
List directory content recursively. The
|
|
|
|
.Fl 1
|
|
|
|
flag is set implicitly.
|
2015-01-20 16:50:37 +00:00
|
|
|
.It Fl r
|
|
|
|
Reverse the sort order.
|
2015-03-18 18:26:42 +00:00
|
|
|
.It Fl S
|
|
|
|
Sort files by size (in decreasing order).
|
2015-01-20 16:50:37 +00:00
|
|
|
.It Fl t
|
|
|
|
Sort files by last file status/modification time instead of by name.
|
|
|
|
.It Fl U
|
|
|
|
Keep the list unsorted.
|
2015-02-18 16:29:46 +00:00
|
|
|
.It Fl u
|
|
|
|
Use file's last access time instead of last modification time for
|
|
|
|
sorting or printing.
|
2015-01-20 16:50:37 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr stat 2
|
2015-03-27 16:22:48 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
|
|
|
.St -p1003.1-2013
|
|
|
|
specification except from the
|
|
|
|
.Op Fl Ckmpsx
|
|
|
|
flags.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Op Fl hU
|
|
|
|
flags are an extension to that specification.
|