In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
The editor today takes you to understand what the chmod command is in the Linux system. The knowledge points in the article are introduced in great detail. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's follow the editor to learn more about "what is the chmod command in the Linux system?"
In the Linux system, the function of the chmod command is to modify the properties of the file. Do not want others to see the contents of a file, you can use the chmod command to set relevant permissions. Let's take a look at the specific use of the Linux command chmod.
1. Linux chmod command syntax the syntax of the Linux chmod command is as follows:
Chmod [OPTION]... MODE [, MODE]... FILE... Chmod [OPTION]... OCTAL-MODE FILE... Chmod [OPTION]... -- reference=RFILE FILE... Where:
U indicates the owner of the file, g indicates that the owner belongs to the same group (group) as the owner of the file, o indicates someone other than others, and an indicates all three.
Means to increase permissions,-to cancel permissions, and = to uniquely set permissions. R means readable, w means writable, x means executable, and X means only if the file is a subdirectory or if the file has been set to executable. The parameters are as follows:
-c: if the file permissions have indeed been changed To show its change action-f: if the file permissions cannot be changed, do not display an error message-v: show the details of permission changes-R: make the same permission changes to all files and subdirectories in the current directory (that is, change them one by one by recursion)-help: display auxiliary instructions-version: display version II, The Linux chmod command uses example 1) set the file to be readable to everyone
[linuxdaxue.com@/home/linuxdaxue.com] $chmod ugo+r file_new [linuxdaxue.com@/home/linuxdaxue.com] $ll file_new-rw-r--r-- 1 linuxdaxue.com linuxdaxue.com 0 Dec 31 2016 file_new2) Settings file is the owner of the file and can be written by those who belong to the same group, but not by others.
[linuxdaxue.com@/home/linuxdaxue.com] $chmod ug+w,o-w file_new [linuxdaxue.com@/home/linuxdaxue.com] $ll file_new-rw-rw-r-- 1 linuxdaxue.com linuxdaxue.com 0 Dec 31 2016 file_new3) Settings file to be executed only by the owner of the file
[linuxdaxue.com@/home/linuxdaxue.com] $chmod Ubunx file_new [linuxdaxue.com@/home/linuxdaxue.com] $ll file_new-x-1 linuxdaxue.com linuxdaxue.com 0 Dec 31 2016 file_new4) Settings file is writable by everyone
[linuxdaxue.com@/home/linuxdaxue.com] $chmod aqiw file_new [linuxdaxue.com@/home/linuxdaxue.com] $ll file_new-- wx-w--w- 1 linuxdaxue.com linuxdaxue.com 0 Dec 31 2016 file_ new3. Use numbers to represent permissions chmod can use numbers to represent each permission. The syntax is as follows:
In chmod abc file, the meaning of abc is as follows:
A User, Group, and Other, each with a number that represents the permissions of the dint, and the permission of the dint. If you want a rwx attribute, then you want a rw- attribute, then you want a rw- attribute, then you want a Rmurx attribute. Example:
1) set the file permissions to be readable to all:
[linuxdaxue.com@/home/linuxdaxue.com] $chmod 444 file_new [linuxdaxue.com@/home/linuxdaxue.com] $ll file_new-linuxdaxue.com linuxdaxue.com 0 Dec 31 2016 file_newLinux which versions of Linux are available: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu, etc. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.
Thank you for your reading, the above is the whole content of "what is the chmod command in the Linux system", learn friends to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!
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.