分类: LINUX
2006-06-26 12:58:39
The following is a brief list of options commonly used with ls. Remember, you can view the full list by reading the ls man page (man ls).
-a (all) — Lists all files in the directory, including hidden files (.filename). The .. and . at the top of your list refer to the parent directory and the current directory, respectively.
-l (long) — Lists details about contents, including permissions (modes), owner, group, size, creation date, whether the file is a link to somewhere else on the system and where its link points.
-F (file type) — Adds a symbol to the end of each listing. These symbols include /, to indicate a directory; @, to indicate a symbolic link to another file; and *, to indicate an executable file.
-r (reverse) — Lists the contents of the directory in reverse sort order.
-R (recursive) — Lists the contents of all directories below the current directory recursively.
-S (size) — Sorts files by their sizes.