• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

ls

ls

ls Lists files or directory contents.
ls [-ACFLRSTWadfgilnoqrsktcux1] <file1>
									<file2> ...

ls [-ACFLRSTWadfgilnoqrsktcux1]

-A Lists all entries except for '.' and '..'. Always set for super user.
-C Forces multicolumn output. Default when output is to a terminal.
-F Displays a symbol, if applicable, after each file to denote the following: Slash (/) for a directory; asterisk (*) for an executable; an at sign (@) for a symbolic link; a percent sign (%) for a whiteout; an equal sign (=) for a socket; a vertical bar (|) for a FIFO.
-L If the argument is a symbolic link, the file or directory the link references rather than the link itself is displayed.
-R Recursively lists subdirectories.
-S Sorts by size, largest file first.
-T Displays complete time information, including month, day, hour, minute, second, and year.
-W Displays whiteouts.
-a Lists all files in the directory, including files whose names begin with a dot (.).
-d If the argument is a directory, it is listed as a plain file, rather than listing its contents. If the argument is a symbolic link, its link information is not displayed.
-f Does not sort output.
-g Does nothing. Is kept for compatibility with older versions of ls.
-i Lists the argument's serial number (inode number).
-l Lists in long format. Displays file mode, number of links, owner name, group name, size of the file in bytes, date and time file was last modified, and the file. If displayed to a terminal, the first line of output is the total number of 512-byte blocks used by the files in the directory.
-n Displays user and group ID as numbers rather than names in a long (-l) output.
-o Includes file flags in a long (-l) output.
-q Forces printing of non-graphic characters in filenames as character ?. Default when output is to a terminal.
-r Reverses sort order to reverse alphabetic order; smallest first or oldest first, as appropriate.
-s Displays file size in 512-byte blocks, where partial units are rounded up to the next integer value. If the output is to a terminal, the first line displayed is the total number of 512-byte blocks used by files in the directory.
-k Modifies the -s option to report sizes in kilobytes.
-t Sorts by time modified (most recently modified first) before sorting in alphabetic order.
-c Uses time when file status was last changed for sorting (-t) or printing (-l).
-u Uses time of last access for sorting (-t) or printing (-l).
-x Forces multicolumn output sorted across the page rather than down the page.
-v Forces unedited printing of non-graphic characters. Default when output is not to a terminal.
-1 Forces output to one entry per line. Default when output is not to a terminal.
-1, -C, -l, and -x options override each other. The last option specified determines the format used.
-c and -u options override each other. The last option specified determines the file time used.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint