ls.1 (2296B)
1 .Dd 2015-10-08 2 .Dt LS 1 3 .Os sbase 4 .Sh NAME 5 .Nm ls 6 .Nd list directory contents 7 .Sh SYNOPSIS 8 .Nm 9 .Op Fl iqr 10 .Op Fl ln 11 .Op Fl A | a 12 .Op Fl 1 13 .Op Fl h | F | p 14 .Op Fl H | L 15 .Op Fl R | d 16 .Op Fl S | f | t | U 17 .Op Fl c | u 18 .Op Ar file ... 19 .Sh DESCRIPTION 20 .Nm 21 lists each given file, and the contents of each given directory. If no files 22 are given the current directory is listed. 23 .Sh OPTIONS 24 .Bl -tag -width Ds 25 .It Fl A 26 List all entries except for '.' and '..'. 27 .It Fl a 28 Show hidden files (those beginning with '.'). 29 .It Fl c 30 Use time file's status was last changed instead of last 31 modification time for sorting or printing. 32 .It Fl d 33 List directories themselves, not their contents. 34 .It Fl F 35 Append a file type indicator to all special files. 36 .It Fl f 37 Like 38 .Fl U 39 but turns on 40 .Fl a 41 and disables 42 .Fl r , 43 .Fl S 44 and 45 .Fl t . 46 .It Fl H 47 List information about the targets of symbolic links specified on the command 48 line instead of the links themselves. 49 .It Fl h 50 Show filesizes in human\-readable format. 51 .It Fl i 52 Print the index number of each file. 53 .It Fl L 54 List information about the targets of symbolic links instead of the links 55 themselves. 56 .It Fl l 57 List detailed information about each file, including their type, permissions, 58 links, owner, group, size or major and minor numbers if the file is a 59 character/block device, and last file status/modification time. 60 .It Fl n 61 List detailed information about each file, including their type, permissions, 62 links, owner, group, size or major and minor numbers if the file is a 63 character/block device, and last file status/modification time, but with 64 numeric IDs. 65 .It Fl p 66 Append a file type indicator to directories. 67 .It Fl q 68 Replace non-printable characters in filenames with '?'. 69 .It Fl R 70 List directory content recursively. The 71 .Fl 1 72 flag is set implicitly. 73 .It Fl r 74 Reverse the sort order. 75 .It Fl S 76 Sort files by size (in decreasing order). 77 .It Fl t 78 Sort files by last file status/modification time instead of by name. 79 .It Fl U 80 Keep the list unsorted. 81 .It Fl u 82 Use file's last access time instead of last modification time for 83 sorting or printing. 84 .El 85 .Sh SEE ALSO 86 .Xr stat 2 87 .Sh STANDARDS 88 The 89 .Nm 90 utility is compliant with the 91 .St -p1003.1-2013 92 specification except from the 93 .Op Fl Ckmpsx 94 flags. 95 .Pp 96 The 97 .Op Fl hU 98 flags are an extension to that specification.