分号让两个命令一起显示且他们之间没有逻辑关系
[root@localhost ~]# ls /;ls
aaa bin boot ccc dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
anaconda-ks.cfg hwclock install.log
[root@localhost ~]# ls /
aaa bin boot ccc dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
[root@localhost ~]# ls
anaconda-ks.cfg hwclock install.log
1.创建目录 /opt/a/b/c1 /opt/a/b2 /opt/a/b1/ /opt/a/b1/b
/opt/a/b2/a /opt/a/b2/b
[root@localhost ~]# mkdir -pv /opt/a{/b/c1,/b1{/a,/b},/b2{/a,/b}}
mkdir: created directory ‘/opt/a/b/c1’
mkdir: created directory ‘/opt/a/b1/a’
mkdir: created directory ‘/opt/a/b1/b’
mkdir: created directory ‘/opt/a/b2/a’
mkdir: created directory ‘/opt/a/b2/b’
[root@localhost ~]# tree /opt
/opt
└── a
├── b
│?? └── c1
├── b1
│?? ├── a
│?? └── b
└── b2
├── a
└── b
2.相对路径下备份
[root@localhost ~]# cp /etc/fstab{,.bnk}
mv 也一样
3.一起批量移动
创建目录
原文:https://blog.51cto.com/14847540/2506187