The LS command is one of the most commonly used commands under Linux, LS is the same as the dir command under DOS, is used to list the files under the directory, let's take a look at the use of LS
English Full Name: list is the meaning of lists, when we learn something in order to know the reason why, when you know that this thing is probably what the future of your thinking will be associated with a lot of things will soon learn.
1. Ls-a lists all files under the file, including "." The beginning of the hidden file (the Linux file hidden file is preceded by the., if present: Represents the existence of 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 the 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 files by Time duration (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
These are some of the use of the LS command, of course, there are a lot of not listed, we can man a bit. Help to learn English
LS can be combined with pipe symbol "|" For a complex operation. For example: LS | Less is used to implement paging of file list, ls
Calculate the number of files in the current directory
LS-|*|grep "^-" | WC-|
Finally, the meaning of some file colors in Linux files
Green----> representative executable, (green represents the meaning of the pass) hehe
Red----> represent compressed files
Dark blue----> representative catalogue
Light blue-----> on behalf of linked files
Grey----> on behalf of some other files
The LS command in Linux is used in detail