Results 1 to 6 of 6
Hi There,
I am looking to delete all directories and files within the directories, from a directory.
Every directory has the same folder within it, which I am looking to ...
- 08-29-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 3
Newbie question about deleting multiple instances of a particular directory
Hi There,
I am looking to delete all directories and files within the directories, from a directory.
Every directory has the same folder within it, which I am looking to remove, for example...
/var/www/website/.svn/
/var/www/website/folder1/.svn/
/var/www/website/folder1/subfolder1/.svn/
etc.
How can I remove all the folders named .svn/ (and all subfiles) instantly?
(If anyone is super clever and also knows the Windows command, that will save some Googling
)
So far I think I'm close with
rm -Ri /var/www/ *.svn/
Any ideas? Thanks guys.
- 08-29-2007 #2
Hi and Welcome !
Above command will remove .svn folder including subfolders under .svn.Code:rm -rf /var/www/website/.svn
Check manual of rm command. man rmIt is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 08-29-2007 #3Just Joined!
- Join Date
- Aug 2007
- Posts
- 3
Hi no that didnt work, but I found a solution for other peoples reference,
find . -name .svn | xargs rm -vRf
cheers
- 08-29-2007 #4
Thats weird. I will look into this. AFAIK, rm -rf removes folders and subfolders instantly.
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 08-29-2007 #5Just Joined!
- Join Date
- Aug 2007
- Posts
- 3
Hi Yea, When I tried your method it just said "directory does not exist", because .svn wasn't in the root, it was in every other directory below it.
Using the method I found, it did a search for all the .svn within all directories, then deleted them and the files.
I tried for hours messing about with rm -rf [options] and I wasnt getting anywhere, hence why I posted here
Thanks for your quick reply though, much appreciated, it led me to finding another solution.
I will no doubt be trying to pick your brains on other topics if you don't mind
- 08-29-2007 #6
You are most welcome to ask for suggestion at any time.

I think problem was directory path only.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First


Reply With Quote
