linux basic commands: ls

Under Linux ls command is one of the most commonly used commands, the following began to introduce some of its basic usage and parameters:

Usage and output

Ls direct input on the command line and press Enter. This is the most streamlined usage, because we have omitted all the options and parameters, the result is output file name and directory in the current directory ()

ls -a # show hidden files and directories

LS the -l # long form to provide more information, such as the size of the files and directories, last update time, the owner and permissions. Use -l (lowercase letter L) option to output a long-format

 

-a list all files in the directory, including Implied beginning of the document.

-b character file name in the list of non-exportable by backslash character number (just like in the C language) form.
Modified node i -c output file, and thus sort.
-d display will be the same directory as the file, rather than the files in the display.
All information -e output time, rather than simple output information.
-f -U do not sort the output file.
-g useless.
-i i node index information output file.
-k represents the size of the file in the form of k bytes.
-l lists the details of the file.
-m lateral output file name, and "," as a sub-grid operator.
-n with digital UID, GID instead of the names.
Details of the group other than the outer -o display information file.
-p -F attached to each file name characters to describe a type of the file, "*" indicates ordinary executable
file; "/" indicates a directory; "@" symbolic link; "|" indicates FIFOs; "=" represents a set
Sockets (sockets).
-q use? instead of characters can not be output.
-r directory reverse order.
-s size of the output file after each file name.
-t sorted in time.
-u sort of time the file was last accessed.
-x output columns, lateral sorting.
-A show all files except "." And ".." outside.
-B does not output a "~" at the end of the backup file.
-C output columns, longitudinal sort.
Information group -G output file.
-L Lists link file name instead of linking to the file.
-N does not limit the length of the document.
-Q output file name in double quotes.
-R lists files in all subdirectories.
-S sorted by file size.
-X sorted by file extension (characters after the last one.).
-1 line output only a file.

--color = no color does not show file names
--help display help information on the standard output.
--version output version information on standard output and exit.

 

Guess you like

Origin www.cnblogs.com/wzy23/p/11373211.html