linux删除多层目录,Linux系统中如何一次创建和删除多个文件/文件夹

1.创建/删除多个文件

//连续创建5个文件,文件名为file1、file2、..file5

[[email protected] ~]# touch file{1..5}

[[email protected] ~]# 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

[[email protected] ~]# rm -rf file*

2.创建/删除多个目录

[[email protected] ~]# mkdir folder{1..5}

[[email protected] ~]# 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

[[email protected] ~]# rm -rf folder*

[[email protected] ~]# 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

原文:https://blog.51cto.com/9664355/2453125

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值