Linux command:chmod

来源:互联网 发布:淘宝客服是卖家吗 编辑:程序博客网 时间:2024/05/23 07:26

chmod
可以使用命令chmod来为文件或目录赋予权限。Linux/Unix 的档案存取权限分为三级 : 档案拥有者、群组、其他。利用 chmod 可以藉以控制档案如何被他人所存取。

administrator@ubuntu:/opt$ chmod –help
Usage: chmod [OPTION]… MODE[,MODE]… FILE…
or: chmod [OPTION]… OCTAL-MODE FILE…
or: chmod [OPTION]… –reference=RFILE FILE…
Change the mode of each FILE to MODE.
With –reference, change the mode of each FILE to that of RFILE.

-c, –changes like verbose but report only when a change is made
-f, –silent, –quiet suppress most error messages
-v, –verbose output a diagnostic for every file processed
–no-preserve-root do not treat ‘/’ specially (the default)
–preserve-root fail to operate recursively on ‘/’
–reference=RFILE use RFILE’s mode instead of MODE values
-R, –recursive change files and directories recursively
–help display this help and exit
–version output version information and exit

Each MODE is of the form ‘[ugoa]*(-+=)+|[-+=][0-7]+’.

Report chmod bugs to bug-coreutils@gnu.org
GNU coreutils home page: http://www.gnu.org/software/coreutils/
General help using GNU software: http://www.gnu.org/gethelp/
For complete documentation, run: info coreutils ‘chmod invocation’
administrator@ubuntu:/opt$

0 0
原创粉丝点击