Article turned from: http://blog.csdn.net/ansha886/article/details/4426103
Recently in the study of Linux, through the blog park to better comb to strengthen the knowledge learned.
The LS command is one of the most commonly used commands under Linux, and the dir command under LS and DOS is used to list files in the directory. English Full Name: list is the meaning of lists.
1. Ls-a lists all files under the file, including "." The beginning of the hidden file (under Linux file hiding is in.), if present: Represents the parent directory).
2. Ls-l lists the details of the file, such as creator, creation time, file read-write permission list, and so on.
3. Ls-f add a character to the end of each file to indicate the type of the file. "@" means symbolic link, "|" Represents FIFOs, "/" for the directory, and "=" for the socket.
4. Ls-s prints the size of the file after each file. Size (sizes)
5. ls-t sort the file by time (time).
6. ls-a list except "." and ".." Other than the file.
7. Ls-r lists all subdirectories in the directory, equivalent to the "recursive" implementation in our programming.
8. ls-l lists the link names of the files. Link (links)
9. ls-s sort files by size
There's so much more.
LS can be combined with pipe symbol "|" To perform complex operations, such as: ls|less for paging the file list
The meaning of some file colors under Linux files:
Green: Represents an executable file
Red: Represents a compressed file
Dark blue: Representative directory
Light blue: Represents a linked file
Gray: Some other files on behalf of
The LS command in Linux is used in detail