Linux study notes -ls command

ls -la /etc

ls is willing to be list , the path where the command is located: /bin/ls

-a --all Display all files, including hidden files , hidden files start with the dot . For the file name , such as: .bashrc

-l detail display long format display

-d View directory attributes, only view the directory, excluding files, subdirectories, etc. under it

-I to see the ID of the file

 

[root@localhost ~]# ll

total 4

-rw-------. 1 root root 1283 Apr 22 16:09 anaconda-ks.cfg

 

1 Reference base for a file?

root owner user/owner , usually the creator

The group to which the root group belongs, the set of users

1283 file size, in bytes

Apr 22 16:09 File last modified time

anaconda-ks.cfg filename

 

1283 shows the bytes. If the file is too large, it is very difficult to read. You can use the -h command to display the human -friendly display and automatically modify the unit.

[root@localhost ~]# ls -lh

total 4.0K

-rw-------. 1 root root 1.3K Apr 22 16:09 anaconda-ks.cfg

 

User ID:

U/user  G/group   O/others

Owner belongs to other groups        

 

 

[root@localhost /]# ll

total 16

lrwxrwxrwx.   1 root root    7 Apr 22 15:57 bin -> usr/bin

dr-xr-xr-x.   5 root root 4096 Apr 22 16:09 boot

drwxr-xr-x.  19 root root 3100 Apr 22 23:36 dev

drwxr-xr-x.  74 root root 8192 Apr 22 23:36 etc

 

Bit 1 : File Type

d        directory   represents the directory

l         linkSoft    link

<!--[if !supportLists]--> -        -    <!--[endif]--> means it is a file

Bit 234 : User 's permissions

rwx             read write execute

 

Bit 456 : Permissions of the Group

rx               read and execute permission, no write permission

Bit 789 : Other permissions

rx               read and execute permission, no write permission

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326008069&siteId=291194637