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

发布时间:2020-06-03 17:33:53 作者:笃信守真
来源:网络 阅读:1423

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
推荐阅读:
  1. Nginx服务优化(一)隐藏版本号
  2. 50.nagios监控工具

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

linux inux nux

上一篇:安装MySQL数据库的详细教程

下一篇:从 ELK 到 EFK 演进

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》