NAME 总揽 POSIX 选项: GNU 选项 (最短方式): [-cfvR] [--reference=rfile] [--help] [--version] 描述
使用chmod命令改变指定文件访问权限有两种方式:一种是用符号 标记所进行更改,另一种方式是采用8进制数指定新的访问权限。
GNU 选项 -f, --silent, --quiet -v, --verbose -R, --recursive 改变目录及其所有子目录的文件的权限 tarena@ubuntu:~/uc/day07$ chmod -R a-x aaa tarena@ubuntu:~/uc/day07$ cd aaa bash: cd: aaa: 权限不够 tarena@ubuntu:~/uc/day07$ chmod -R a-x aaa chmod: 无法读取目录"aaa": 权限不够 tarena@ubuntu:~/uc/day07$ ls -l 总用量 16 d-w--w---- 2 tarena tarena 4096 4月 12 22:02 aaa -rw-rw-r-- 1 tarena tarena 26 4月 11 13:13 day07.txt -rw-rw-r-- 1 tarena tarena 8 4月 11 13:55 hello2.c -rw-rw-r-- 1 tarena tarena 8 4月 11 13:24 hello.c tarena@ubuntu:~/uc/day07$ tarena@ubuntu:~/uc/day07$ chmod -R a+x aaa chmod: 无法读取目录"aaa": 权限不够 tarena@ubuntu:~/uc/day07$ cd aaa tarena@ubuntu:~/uc/day07/aaa$ tarena@ubuntu:~/uc/day07$ ls -l 总用量 16 d-wx-wx--x 2 tarena tarena 4096 4月 12 22:02 aaa -rw-rw-r-- 1 tarena tarena 26 4月 11 13:13 day07.txt -rw-rw-r-- 1 tarena tarena 8 4月 11 13:55 hello2.c -rw-rw-r-- 1 tarena tarena 8 4月 11 13:24 hello.c |
|