command format and directory processing command LS
command format : command [- options ] [ parameters ]
For example : ls-la/etc
Description :
1) Individual command use does not follow this format
2) when multiple options are available, they can be written together
3) Simplified and complete options
-A equals --all
PS: In Linux ". "represents a hidden file.
Directory processing command:ls |
Command name : |
Ls |
Command English original : |
List |
Command path : |
/bin/ls |
Execute permissions : |
All Users |
Function Description : |
displaying catalog files |
Syntax : |
LS option [-ald][ file or directory ] |
|
-A displays all files, including hidden files |
|
-L Detailed information display |
|
-D View Directory properties |
#ls -A View the files in this directory ( contains hidden files )
#ls-L Show file Details
1 root root 1208 3 06:22 anaconda-ks.cfg
1 root root 24772 3 06:22 install.log
1 root root 7690 3 06:21 install.log.syslog
Root owner Root belongs to group 7690 File size
The following Ls-lh is to turn the byte display of the file size into a familiar Windows
1.2K December 3 06:22 anaconda-ks.cfg-rw-r--r--. 1 root root 25K December 3 06:22 install.log-rw-r--r--. 1 roo T root 7.6K December 3 06:21 install.log.syslog
1.2K and 7690 represent a meaning, except that when using LS-LH, the file size becomes the familiar K, M, g representation rather than the byte representation.
-rw-r--r--
- file Type (- binary file D indicates directory l indicates soft link file )
rw-r--r--
U g o
U owner G - owned group o other person
Ps:r Read W write x Execute
[Email protected] ~]# ls-lhd/etcdrwxr-xr-x. 102 root root 12K December 06:36/etc
ls-lhd/etc is to view etc the size of the directory rather than the view ect all content under the directory.
[Email protected] ~]# ls-i795111 anaconda-ks.cfg 786436 install.log 786437 install.log.syslog
#ls-I. view each file's ID number
Common command of Linux learning ls