Are you looking for customized advices? Click here to contact the expert!
by
0
5
2,481
1
Top 1% !
Popular
Famous
Specified
OpenSource
Popularity: 6458th place
Created
Modified Nov 11, 2013
No tags for this snippet yet.
LanguageBASH
LicenseMIT_X11
OSLinux

Simple command to erase all the folders with a given name

This is how to remove all folders with a given name (e.g. "CVS") starting from a root folder ('.' is the current folder)
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/12282/Simple-command-to-erase-all-the-folders-?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
find . -name <fileName> -type d -print0 | xargs -0 rm -fr e.g. find . -name CVS -type d -print0 | xargs -0 rm -fr
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus