17. 修改文件权限,在temp文件夹下的aaA.txt 、b33a.txt 、 ca333.txt文件默认权限如下: -rwxrwxr-x. 2 zys zys 6 1月 20 20:27 aaA.txt -rw-rw-r--. 1 zys zys 8 1月 20 20:27 b33a.txt -rw-rw-r--. 1 zys zys 3 1月 20 20:27 ca333.txt 使用两种形式(符号法和数字法)修改权限如下: aaA.txt:移除属组用户的执行权限,移除其他人的读和执行权限 b33a.txt:移除所有者的执行权限,将属组和其他人的权限设置为可读 ca333.txt:为属组添加写权限,为所有人添加执行权限
时间: 2024-02-15 08:13:19 浏览: 31
使用符号法修改权限:
```
chmod g-x,o-rx aaA.txt
chmod u-x b33a.txt
chmod g+w,o+x ca333.txt
```
使用数字法修改权限:
```
chmod 664 aaA.txt
chmod 664 b33a.txt
chmod 775 ca333.txt
```
其中,符号法中:
- `g-x` 表示移除属组用户的执行权限
- `o-rx` 表示移除其他人的读和执行权限
- `u-x` 表示移除所有者的执行权限
- `g+w` 表示为属组添加写权限
- `o+x` 表示为其他人添加执行权限
数字法中:
- `6` 表示所有者有读写权限,属组用户有读写权限,其他人有读权限
- `4` 表示只读权限
- `5` 表示读写权限
- `7` 表示读写执行权限
相关问题
在temp文件夹下创建a1.txt,aaA.txt,b33a.txt,ca333.txt,d.dxd,e.txt,b1.txt文件
在Linux系统中,可以使用以下命令在temp文件夹下创建a1.txt、aaA.txt、b33a.txt、ca333.txt、d.dxd、e.txt和b1.txt文件:
```
cd temp
touch a1.txt aaA.txt b33a.txt ca333.txt d.dxd e.txt b1.txt
```
该命令使用`touch`命令在temp文件夹下创建了七个空文件,文件名分别为a1.txt、aaA.txt、b33a.txt、ca333.txt、d.dxd、e.txt和b1.txt。
在temp 文件夹下创建 a1.txt、aaA.txt、b33a.xtca333.txt、d.txte.txt、b1.txt
好的,你可以执行以下命令来完成这个任务:
```
cd temp
touch a1.txt aaA.txt b33a.xtca333.txt d.txte.txt b1.txt
```
这将在 temp 文件夹下创建名为 a1.txt、aaA.txt、b33a.xtca333.txt、d.txte.txt、b1.txt 的五个文件。请注意,这些文件名是按照你的要求来命名的,而不是按照任何规律或顺序来命名的。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)