Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 9739  / 2 Years ago, sun, february 20, 2022, 6:06:23

I know a command to do the same with files, but what about folders (and all the files in it of course)?


More From » files

 Answers
1

The command you refer is find I suppose.



You should use the command -exec rm -r {} ; and add the -depth option.



The -r option to rm remove directories with all the content.

The -depth option tell find to elaborate content of folders before the folder itself.


[#41534] Monday, February 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ovierman

Total Points: 445
Total Questions: 108
Total Answers: 111

Location: Libya
Member since Fri, Oct 30, 2020
4 Years ago
;