[Linux] based learning file permissions and attributes

In the command input [ls -al] line
[ls] command means "list", used to list file names and associated attributes.
[-al] option means set out in detail the rights and property of all files.

wyy@ubuntu:~$ ls -al
total 228
drwxr-xr-x 26 wyy  wyy   4096 Feb  9 00:26 .
drwxr-xr-x  3 root root  4096 Sep 11 02:39 ..
-rw-r--r--  1 wyy  wyy    460 Nov 11 03:25 awkexe1.sh
-rw-r--r--  1 wyy  wyy    189 Nov 11 03:25 awk.out
-rw-------  1 wyy  wyy  11406 Feb  7 20:16 .bash_history
-rw-r--r--  1 wyy  wyy    220 Sep 11 02:39 .bash_logout
drwx------ 15 wyy  wyy   4096 Oct 22 08:35 .cache
drwx------ 13 wyy  wyy   4096 Dec 21 03:54 .config

Meaning every row from left to right are seven fields:

A. The type of file permissions

This field and consists of 10 characters:

1. The first character represents the type of file

[D]: represents the directory
[-]: indicates the file
[L]: indicates a link file
[B]: indicates the file storage device
[C]: the device file represents a serial interface device (keyboard, mouse)

2. The next three permission character set, which represents the file

First set: the file owner permissions
second group: the account file permissions user group
Third group: other account authority
characters each of three [rwx], representing the read (read), writable (Write), perform (Execute), if the privilege having a corresponding character is displayed, if the display has a [-].
Note:
1) root account largely unaffected by the system permission restrictions.
2) If an account rights to the file is a directory [r-], you can read unenforceable, then it can not enter the directory.

The number of file names Second, link to node
Third, the owner of the file
Fourth, the user group to which the file belongs
Fifth, the file size

The default unit is Bytes

Sixth, the file creation date / date of last modification
Seven, the file name

Hidden files are not listed if there are [.], On behalf of the files are hidden files, using only [ls] command before the file name

Released three original articles · won praise 3 · views 79

Guess you like

Origin blog.csdn.net/weixin_44703333/article/details/104237146