The LS command is the most commonly used command in Linux. The LS command is short for list. By default, LS is used to print the list of the current directory. If ls specifies other directories, the list of files and folders in the specified directory is displayed. By using the LS command, you can view not only the files contained in Linux folders, but also the File Permission (including the directory, folder, and file permission) to view the directory information.
Ls
[[Email protected]/] # ls-l
Total 102
Dr-XR-X. 2 root Root 4096 Jul 12 14:47 Bin
-L: long format
File Type:
-: Common file (f)
D: directory file
B: block Device Files)
C: character device file (character)
L: Symbolic Link file)
P: Command pipeline file (PIPE)
S: Socket File)
File Permission: 9 bits, each 3 bits, each group: rwx (read, write, execute), r --
Number of file hard links
File owner)
File Group)
File size (size), in bytes
Timestamp: The last modification time.
Access: Access
Modify: Modify. The file content has changed.
Change: Change, metadata, metadata
[[Email protected]/] # ls-lH
Total 102 K
Dr-XR-X. 2 root Root 4.0 K Jul 12 Bin
-H: converts units.
[[Email protected]/] # ls-
... Autofsck bin boot. Reset Dev etc home lib lib64 lost + found media misc mnt net opt proc root sbin SELinux SRV sys TMP u01 USR VaR
-A: displays hidden files starting ".".
. Indicates the current directory
.. Indicates the parent directory
[[Email protected] Home] # ls-LD
Drwxr-XR-X. 5 root Root 4096 Jul 12 13:43.
-D: displays the directory attributes.
[[Email protected] Home] # ls-I
1715907 DVD 1717852 Oracle 1578497 xiaolai
-I: Index node, inode
[[Email protected]/] # ls
Bin boot Dev etc home lib lib64 lost + found media misc mnt net opt proc root sbin SELinux SRV sys TMP u01 USR VaR
[[Email protected]/] # ls-R
VaR USR u01 TMP sys SRV SELinux sbin root proc opt net mnt misc media lost + found lib64 lib home etc Dev boot Bin
-R: reverse display
-R: recursive display
This article from "stick to your dreams" blog, please be sure to keep this source http://xiaolai0528.blog.51cto.com/2366992/1531738