Looping through directories in Bash

后端 未结 3 869
名媛妹妹
名媛妹妹 2020-12-24 08:26

I require the script to cd to a directory, then delete all but a few files in sub-directories—but leave the folders alone. Would it help to use switch

3条回答
  •  误落风尘
    2020-12-24 09:00

    Using find? You can use several parameters, including depth, file age (as in stat), perms etc...

    find . -maxdepth 2
    

提交回复
热议问题