the linux file attributes

1. We use the files in the directory ls -al View

 

 

 2. Look at the first permission  -rw-R & lt - r-- . 1 Hui Hui 3806 17:48 On Oct. 3 .bashrc

 

 

 For .bashrc, which permissions are -rw-r - r-- represents a total of 10 characters,

The first character represents the file is a directory, the file or linked files, and so on: here is - indicates the file

o When is [d] is a directory, for example, the line in the table file named ".config" in;
o When is [-] is a file, such as a table file called "initial-setup-ks.cfg" that line;
O if [l] is represented as a link to a file file link);
O if [b] indicates that the interface devices (random access unit) a means for storing the files inside;
O if [c] is expressed as document which means serial port device, such as a keyboard, a mouse (one reading device).

The remaining nine three characters as a group, divided into three groups, a combination of permissions rwx, - indicates no permission; R & lt representative of read permission, write permission on behalf of W, x Representative executable permissions;

1. "The first group represents the file permissions for the file owner, the owner is to .bashrc file hui, whose authority is rw-, that is to say hui have read and write access to the file, but do not have permission;

2. "The second group represents the file permissions for the user group is a user group hui hui where, for permission .bashrc user group is r--, that is to say hui this user group only read access to the file, You can not modify and execute the file;

3. "The third group is called representatives of other groups and other user permissions for .bashrc, another user only r--, which is read access, modify, and execute the file can not be

3. Look at the second link number   . 1 Hui Hui 3806 17:48 On Oct. 3 .bashrc 

每个文件都会将他的权限与属性记录到文件系统的i-node 中,不过,我们使用的目录树却是使用文件
名来记录, 因此每个档名就会连结到一个 i-node 啰!这个属性记录的,就是有多少不同的档名连结
到相同的一个i-node 号码去就是了,下面这个文件就有14个链接

 

 

4.再看第三个文件的所有者

 

 5.再看第四个:文件用户组,在此处是hui

在 Linux 系统下,你的账号会加入于一个或多个的群组中。如,hui, class2, class3
均属于hui 这个群组,假设某个文件所属的群组为hui,且该文件的权限是
(-rwxrwx---),则 hui, class2, class3 三人对于该文件都具有可读、可写、可执行的权限(看群组权限)。
但如果是不属于 hui组 的其他账号,对于此文件就不具有任何权限了。

 

 6.往后依次是文件大小单位是bytes,修改日期,图中日期只有到月份如果要实现年则要加上ls -l --full-time,以及最后的文件名,文件名以.开头表示隐藏的文件

 

 

 

 

Guess you like

Origin www.cnblogs.com/huipengbo/p/12078178.html