Description of file properties under Linux

Source: Internet
Author: User

(-rw-r--r--) (1) (root) (root) (42304) (Sep 4 18:26) (Install.log)
(1) file type permission, (2) Number of connections, (3) file owner, (4) file group, (5) file capacity, (6) time the file was eventually modified, (7) file name
-rw-r--r--
The first character indicates that the file is "login, file or link files, etc.":
When [d] is a login, for example, the file name is ". GConf";
When [-] is the file, for example, the file name is "Install.log";
If [l] is indicated as a link file (link file);
If [b] means OU (random access device) for the available storage interface in the device file;
If [c] is OU for the serial port inside the appliance file, such as a keyboard, mouse (one despair reading device).
In the following characters, a group of three, each of which is a combination of three parameters, is "rwx".
where [R] stands for readable (read), [W] stands for writable (write), [x] stands for executable (execute). Note that the location of these three permissions will not change, if there is no permission, there will be a minus sign [-] just.
The first group is "the rights of the owner of the file", taking "Install.log" the file as an example, the owner of the file can read and write, but not executable;
The second group is "permission of the same group";
The third group is "permissions for other non-native groups".
If the file name is preceded by one more. ", this file is a" hidden document ", for example. GConf, which is a hidden file.

The replication behavior (CP) replicates the properties of the performer and the permissions

The importance of permissions to archives:
Files are places where data is actually stored, including generic text files, binary executables (binaryprogram), and so on. So, for the two archives, the meaning of the privilege is this:
R (Read): Can read the actual contents of this file, such as reading the text file content, etc.;
W (write): can be edited, the new abstinence is to modify the contents of the file (but not tons delete the file);
X (EXecute): The file has permissions that can be executed by the system.
That readable (r) Representative reads the contents of the file is a good overview, then the executable (x)? You must be careful here! Because the ability to execute on a file under Windows is determined by an "extension", for example,. exe,. bat,. com, and so on, but under Linux, whether or not our files can be executed is decided by the "X" Permission! There is no absolute relationship with the file name! To two last w what about this permission? When you have W permissions on a file, you can have write/edit/Add/Modify Files
Content, but does not have the right to delete the file itself! For the rwx of the two archives, the main focus is on the
"And Cairns regional, not the existence of file name does not matter Oh!" Because the records are the actual data!

The importance of permissions to the directory:
Archives are the place where the actual data are stored, what is the main store of the catalogue? The main contents of the directory in the record file name list, the filename does not have a strong connection to the directory! So what is the meaning of the R, W, and X to the directory if it is for the directory?
R (Read contents in directory):
Represents a permission to read a list of directory structures, so when you have read (r) permissions for a directory, you can query the file name data under that directory. So you can use LS This led order to display the table of contents of this directory!
W (Modify contents of directory):
This writable permission is vigilance to the directory! Because he says you have a different permission to the directory structure list, which is the permissions below:
Creation of new files not directories;
Delete files that already exist do not directory (taboo the permissions of the file!) )
Rename the existing file ring directory import line;
Move the files and directory locations within the directory. In short, the directory of W permissions should not be login under the name of the different to the right!
X (Access directory):
Hey! What is the use of directory execution permissions? The directory is just a login file name, can not be carried out to execute it? That's right! Directory can not be executed, the directory of X represents the user can import into the directory to become the purpose of working directory! The so-called working directory is the directory where you are now! Bowl example, when you log in to Linux, your home directory is your current working directory. The LED order of the transform directory is "CD" (Change directory)!

Description of file properties under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.