首页 > 代码库 > 命令创建扩展

命令创建扩展

命令创建扩展

(1)创建/tmp目录下的a_b,a_d,b_c,b_d

技术分享

2016-09-25_15-43-52.png

[root@foundation0 /]# cd /tmp/
[root@foundation0 tmp]# ls
[root@foundation0 tmp]# touch {a_c, a_d , b_c, b_d}
[root@foundation0 tmp]# ls
, {a_c, a_d b_c, b_d}
[root@foundation0 tmp]# rm -rf *
[root@foundation0 tmp]# ls
[root@foundation0 tmp]# touch {a,b}_{c,d}
[root@foundation0 tmp]# ls
a_c a_d b_c b_d

(2)创建/tmp/mklinux目录下的:

技术分享

2016-09-25_15-27-57.png

技术分享

2016-09-25_15-45-46.png

[root@foundation0 tmp]# mkdir -p /tmp/mylinux/{bin,boot/grup,dev,etc/{rc.d/init.d,sysconfig/network-scripts},lib/modules,lib64,proc,sbin,sys,tmp,usr/local/{bin,sbin},var/{lock,log,run}}
[root@foundation0 tmp]# ls
a_c a_d b_c b_d mylinux
[root@foundation0 tmp]# cd mylinux/
[root@foundation0 mylinux]# ls
bin boot dev etc lib lib64 proc sbin sys tmp usr var
[root@foundation0 mylinux]# cd boot/
[root@foundation0 boot]# ls
grup
[root@foundation0 boot]# cd /tmp/mylinux/etc/
[root@foundation0 etc]# ls
rc.d sysconfig
[root@foundation0 etc]# cd rc.d/
[root@foundation0 rc.d]# ls
init.d
[root@foundation0 rc.d]# cd ..
[root@foundation0 etc]# cd sysconfig/
[root@foundation0 sysconfig]# ls
network-scripts
[root@foundation0 sysconfig]# cd /tmp/mylinux/lib
[root@foundation0 lib]# ls
modules
[root@foundation0 lib]# cd /tmp/mylinux/usr/
[root@foundation0 usr]# ls
local
[root@foundation0 usr]# cd local/
[root@foundation0 local]# ls
bin sbin
[root@foundation0 local]# cd /tmp/mylinux/var/
[root@foundation0 var]# ls
lock log run

命令创建扩展