Home >Operation and Maintenance >Linux Operation and Maintenance >How to view directory in linux
The command to view files and directories in Linux is: LS
The Linux ls command is used to display the contents of the specified working directory (list the contents of the current working directory files and subdirectories).
Syntax
ls [-alrtAFR] [name...]
Parameters:
-a Display all files and directories (ls defaults to file names or directory names starting with "." Treated as hidden files and will not 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 Files are displayed in reverse order (originally in English alphabetical order)
-t List files in order of creation time
-A Same as -a, but do not list "." (Current directory) and ".." (parent directory)
-F Add a symbol after the listed file name; for example, add "*" for executable files and "/"## for directories.
#-R If there are files in the directory, the following files will also be listed in sequenceExample
List all files under the root directory (\) Directory# ls /bin dev lib media net root srv upload wwwboot etc lib64 misc opt sbin sys usrhome lost found mnt proc selinux tmp varRecommended related articles and tutorials:
The above is the detailed content of How to view directory in linux. For more information, please follow other related articles on the PHP Chinese website!