LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 10-26-2011, 04:00 PM   #1
ibbofez
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
find folders in a folder and delete


i have a customer that does not have ssh access and needs me to run a command for him. i just want to make sure that this is the correct command. he needs to delete the .svn folders that he uploaded with his script. i do not want this to remove any .svn folders anywhere else on the system other than his hosting account. his hosting account folder is found here: /home/thepope/www/intranet

the command i assume i need to run is (after cd to his folder):
find . -type d -name '.svn' -exec rm -rf {} \

am i correct on this?
 
Old 10-26-2011, 04:11 PM   #2
eeekster
Member
 
Registered: Sep 2011
Posts: 157

Rep: Reputation: Disabled
You want '*.svn' instead of '.svn' in the find command. It's also best to do a test in another (throw away) directory first.
 
Old 10-26-2011, 04:13 PM   #3
ibbofez
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by eeekster View Post
You want '*.svn' instead of '.svn' in the find command.
the folder is called .svn so i am not sure why i need the * infront. i also forgot to mention that i am running centos

Last edited by ibbofez; 10-26-2011 at 04:16 PM. Reason: forgot something
 
Old 10-26-2011, 04:20 PM   #4
eeekster
Member
 
Registered: Sep 2011
Posts: 157

Rep: Reputation: Disabled
Quote:
Originally Posted by ibbofez View Post
the folder is called .svn so i am not sure why i need the * infront. i also forgot to mention that i am running centos
You don't. I was reading it wrong.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find (various -name + delete contents but excluding some user folders in /home Virtuose Linux - Newbie 5 01-12-2011 10:16 AM
[SOLVED] How to list folder size, and number of files and folders in folder steven.c.banks Linux - General 3 11-24-2010 06:24 AM
Find folders with ONLY one specific file in and delete file and folder - How ? gedi1 Linux - Newbie 5 10-21-2009 08:09 PM
find -exec command to recursively delete files and folders in folders with X name Joan Murt Linux - Newbie 2 07-08-2009 04:35 PM
find -delete folders Meson Linux - General 7 04-16-2008 01:30 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration