资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

Linux系统中如何一次创建和删除多个文件/文件夹

Linux系统中如何一次创建和删除多个文件/文件夹

1.创建/删除多个文件

//连续创建5个文件,文件名为file1、file2、..file5
[root@server ~]# touch file{1..5}
[root@server ~]# ls
anaconda-ks.cfg  Downloads  file3  hello    install.log         Pictures   test
Desktop          file1      file4  hello.c  install.log.syslog  Public     Videos
Documents        file2      file5  hello.o  Music               Templates
[root@server ~]# rm -rf file*

2.创建/删除多个目录

[root@server ~]# mkdir folder{1..5}
[root@server ~]# ls
anaconda-ks.cfg  file1  file5    folder4  hello.o             Pictures   Videos
Desktop          file2  folder1  folder5  install.log         Public
Documents        file3  folder2  hello    install.log.syslog  Templates
Downloads        file4  folder3  hello.c  Music               test

[root@server ~]# rm -rf folder*
[root@server ~]# ls
anaconda-ks.cfg  Downloads  file3  hello    install.log         Pictures   test
Desktop          file1      file4  hello.c  install.log.syslog  Public     Videos
Documents        file2      file5  hello.o  Music               Templates

文章名称:Linux系统中如何一次创建和删除多个文件/文件夹
本文URL:http://cdkjz.cn/article/pspcdh.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220