用Linux1.创建/myfile/dir1,/myfile/dir2目录,在/myfile/dir1目录下新建aa.txt,bb.txt,cc.txt,dd.txt文件 2.将aa.txt文件移动到/myfile/dir2目录下 3.将bb.txt文件复制到/myfile/dir2目录下,并把名字更新为bb2.txt 4.删除bb.txt文件 5.将cc.txt,dd.txt复制到/myfile/dir2目录下,并删除dir1目录
时间: 2023-05-19 21:06:53 浏览: 160
Linux-60-commands.rar_Linux/Unix编程_WORD_
1. 创建目录:
```
mkdir -p /myfile/dir1 /myfile/dir2
```
在 `/myfile/dir1` 目录下创建文件:
```
touch /myfile/dir1/aa.txt /myfile/dir1/bb.txt /myfile/dir1/cc.txt /myfile/dir1/dd.txt
```
2. 移动文件:
```
mv /myfile/dir1/aa.txt /myfile/dir2/
```
3. 复制文件并重命名:
```
cp /myfile/dir1/bb.txt /myfile/dir2/bb2.txt
```
4. 删除文件:
```
rm /myfile/dir1/bb.txt
```
5. 复制并删除目录:
```
cp /myfile/dir1/cc.txt /myfile/dir2/
cp /myfile/dir1/dd.txt /myfile/dir2/
rm -r /myfile/dir1
```
阅读全文