hxd@localhost ~]$ ls
公共 模板 视频 图片 文档 下载 音乐 桌面
[hxd@localhost ~]$ [hxd@localhost ~]$ ls
公共 模板 视频 图片 文档 下载 音乐 桌面
[hxd@localhost ~]$
[hxd@localhost ~]$ mkdir Dir1
[hxd@localhost ~]$ mkdir -m 007 Dir2
[hxd@localhost ~]$ mkdir Dir3 Dir4 Dir5
[hxd@localhost ~]$ mkdir -p /Dir1/Dir2/Dir3/Dir4/Dir5
[hxd@localhost ~]$ ls
公共 视频 文档 音乐 Dir1 Dir3 Dir5
模板 图片 下载 桌面 Dir2 Dir4
[hxd@localhost ~]$ ls -a
. 模板 文档 桌面 .bashrc Dir1 Dir4 .mozilla
.. 视频 下载 .bash_logout .cache Dir2 Dir5
公共 图片 音乐 .bash_profile .config Dir3 .local
[hxd@localhost ~]$ cd Dir1
[hxd@localhost Dir1]$ CD ../Dir1
bash: CD: command not found...
Similar command is: 'cd'
[hxd@localhost Dir1]$
[hxd@localhost Dir1]$ cd -
/home/hxd
[hxd@localhost ~]$
[hxd@localhost ~]$ cd /
[hxd@localhost /]$
[hxd@localhost /]$ cd
[hxd@localhost ~]$
[hxd@localhost ~]$ mkdir 6666
[hxd@localhost ~]$ ls
6666 模板 图片 下载 桌面 Dir2 Dir4
公共 视频 文档 音乐 Dir1 Dir3 Dir5
[hxd@localhost ~]$
[hxd@localhost ~]$ cd 6666
[hxd@localhost 6666]$ mkdir File1.cfg
[hxd@localhost 6666]$ ls
File1.cfg
[hxd@localhost 6666]$ mv File1.cfg File2.cfg
[hxd@localhost 6666]$ ls
File2.cfg
hxd@localhost 6666]$ ls
Dir1 File2.cfg
[hxd@localhost 6666]$ mv File2.cfg ./Dir1
[hxd@localhost 6666]$ ls
Dir1
[hxd@localhost 6666]$ cd Dir1
[hxd@localhost Dir1]$ ls
File2.cfg
[hxd@localhost Dir1]$
[hxd@localhost 6666]$
[hxd@localhost 6666]$ ls
Dir1 Dir3
[hxd@localhost 6666]$ mv Dir1 ./Dir3/Dir2
[hxd@localhost 6666]$ ls
Dir3
[hxd@localhost 6666]$ mv -f ./Dir3/* .
[hxd@localhost 6666]$ LS
[hxd@localhost 6666]$ ls
Dir2 Dir3
hxd@localhost ~]$ ls 6666
Dir2 Dir3
[hxd@localhost ~]$ cd 6666
[hxd@localhost 6666]$ rmdir Dir3
[hxd@localhost 6666]$
[hxd@localhost Dir3]$ rmdir -p File.cfg
[hxd@localhost Dir3]$ ls
[hxd@localhost 6666]$ tar -cvf Dir2.tar Dir2
Dir2/
Dir2/File2.cfg/
[hxd@localhost 6666]$ tar -xvf Dir2.tar
Dir2/
Dir2/File2.cfg/
[hxd@localhost 6666]$ ls
Dir2 Dir2.tar Dir3
[hxd@localhost 6666]$
linux一些基础文件操作命令
最新推荐文章于 2024-07-17 15:14:42 发布