ls in Linux is the abbreviation of "list files", which means listing files. The ls command is used to display the contents of the specified working directory and list the files and subdirectories contained in the current working directory. The syntax is "ls [-alrtAFR] [name...]".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Linux ls (English spelling: list files) command is used to display the contents of the specified working directory (list the files and subtitles contained in the current working directory) Table of contents).
Syntax
ls [-alrtAFR] [name...]
Parameters:
-a Display all files and directories (hidden files starting with . will also be listed)
-l In addition to the file name, the file type, permissions, owner, file size and other information are also listed in detail
-r Replace the file with Display in reverse order (originally in English alphabetical order)
-t List the files in order of creation time
-A Same -a, but do not list "." (current directory) and ".." (parent directory)
-F Add a symbol after the listed file name; for example, you can Add "*" to the executable file, and "/"
-R for the directory. If there are files in the directory, the following files will also be listed in sequence
Example
List all directories under the root directory (\):
# ls / bin dev lib media net root srv upload www boot etc lib64 misc opt sbin sys usr home lost+found mnt proc selinux tmp var
List all files in the current working directory whose names begin with s, the newer the files, the more recent they are. Behind:
ls -ltr s*
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What does ls mean in linux. For more information, please follow other related articles on the PHP Chinese website!