66 lines
1.7 KiB
Plaintext
66 lines
1.7 KiB
Plaintext
|
|
|
|
|
|
|
|
|
|
Command: ls - list the contents of a directory
|
|
Syntax: ls [-acdfgilqrstu1ACFMRTX] [name] ...
|
|
Flags: -a List all entries including those starting with .
|
|
-c Use the inode change time instead of modification time
|
|
-d Do not list contents of directories
|
|
-f List argument as unsorted directory
|
|
-g Long listing with the owner field suppressed
|
|
-i I-node number printed in first column
|
|
-l Long listing: mode, links, owner, group, size and time
|
|
-n Print numerical user and group id's
|
|
-q Print ? in place of non-graphic characters
|
|
-r Reverse the sort order
|
|
-s Print the size in kilobyte units
|
|
-t Sort by time, latest first
|
|
-u Use last access time instead of modification time
|
|
-1 Print one entry per line
|
|
-A All entries are listed, except . and ..
|
|
-C Multicolumn listing with entries sorted down the page
|
|
-F Put /, | and * after directories, fifos and executables
|
|
-M List mode and name
|
|
-R Recursively list subdirectories
|
|
-T Separate by file type
|
|
-X Use a special crunched format
|
|
Examples: ls -l # List files in working directory
|
|
ls -lis # List with i-nodes and sizes
|
|
|
|
For each file argument, list it. For each directory argument, list
|
|
its contents, unless -d is present. When no argument is present, the
|
|
working directory is listed. If the output is a terminal then -qC is
|
|
assumed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|