17文件处理命令chmod
命令名称:chmod
英文愿意:change the permissions mode of a file
命令所在路径:/bin/chmod
执行权限:所有用户
语法:chmod[{ugoa}{±=}{rwx}][文件或目录]
[mod=421][文件或目录]
-R 递归修改
功能描述:改变文件或目录权限
范例:
~chmod g+w testfile
赋予文件testfile所属组写的权限
~chmod -R 777 testfile
修改目录testfile及目录下文件为所有用户的所有权限
权限的数字表示
r——4
w——2
x——1
rwxrw-r–
7 6 4
**权限 | file(文件)命令** |
---|---|
r | cat/ more/head/tail/less |
w | vim |
x | script / command |
**权限 | directory(目录)命令** |
---|---|
r | ls |
w | touch/mkdir/rmdir/rm |
x | cd |
来源:CSDN
作者:许小佳
链接:https://blog.csdn.net/sjh846885668/article/details/103141493