In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what does d refer to in linux". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what does d mean in linux".
In linux, the full name of d is "directory", which means "directory" and is an attribute that specifies the file type in file permissions; if the first attribute of a file is represented by "d", it means that the file is a directory file.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Linux system is a typical multi-user system, different users are in different positions and have different permissions.
In order to protect the security of the system, the Linux system makes different provisions on the permissions of different users to access the same file (including directory files).
In Linux, we usually use the following two commands to modify the users and permissions of a file or directory:
Chown (change owner): modify the users and groups to which they belong.
Chmod (change mode): modify the user's permissions.
In the following figure, the user is authorized through chown, and the permission to open the door is set for the user through chmod.
In Linux, we can use the ll or ls-l command to display the properties of a file and the users and groups to which the file belongs, such as:
[root@www /] # ls-ltotal 64dr-xr-xr-x 2 root root 4096 Dec 14 2012 bindr-xr-xr-x 4 root root 4096 Apr 19 2012 boot.
In the example, the first attribute of the bin file is represented by d. D means in Linux that the file is a directory file.
The first character in Linux indicates whether the file is a directory, a file, a linked file, and so on.
When d, it is a directory (directory)
When it is-it's a file.
If l is expressed as a linked document (link file)
If b, it is represented as a storage interface device (random access device) in the device file.
If c is expressed as a serial port device in the device file, such as keyboard and mouse (one-time reading device).
In the following characters, there are three as a group, all of which are the combination of three parameters of rwx. Where r stands for read, w for write, and x for execute. It is important to note that the location of these three permissions will not change, if there are no permissions, there will be a minus sign-just.
The attributes of each file are determined by the 10 characters in the first part on the left (see figure below).
It is represented by the numbers 0-9 from left to right.
Bit 0 determines the file type, and bits 1-3 determine that the owner (the owner of the file) has permissions for the file.
Bits 4-6 determine that the group (the same group user of the owner) has permissions for the file, and bits 7-9 determine that other users have permissions for the file.
Bits 1, 4 and 7 represent read permissions. If represented by r characters, they have read permissions. If represented by-characters, they do not have read permissions.
Bits 2, 5, and 8 represent write permissions, if they are represented by w characters, they have write permissions, if they are represented by-characters, they do not have write permissions; bits 3, 6, and 9 represent executable permissions, and if they are represented by x characters, they have execute permissions, and if they are represented by-characters, they do not have execute permissions.
Thank you for your reading. the above is the content of "what d refers to in linux". After the study of this article, I believe you have a deeper understanding of what d refers to in linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.