Bash
Moderator: Moderators
- Tim Blokdijk
- Posts: 1242
- Joined: 29 May 2005, 11:18
Bash
Anybody here that would know how to remove the ".svn" dir (and all files in it) from the current and all sub-directory's with bash?
Code: Select all
find . -name *.svn* | xargs rm -r
That will break of any of the directories contain spaces. I would reccomend:
Code: Select all
find -type d -name ".svn" -exec rm -rf "{}" ";"
Just to show off, how about:
Code: Select all
for SVN_DIR in `find . -type d -name .svn`; do rm -rf $SVN_DIR; done
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
I dont know what you need it for, but what about "svn export":
Code: Select all
svn export ./ /tmp/svn_without_svn_dirs
Last edited by Auswaschbar on 07 Aug 2007, 17:16, edited 1 time in total.
[10:58:15 AM] <Forum> ( <td widt° 56' N, 11° 35' O</span><br /></td>) Linux -> Bash : http://tinyurl.com/2ukkge
[11:19:01 AM] <Forum> ( <td widt° 56' N, 11° 35' O</span><br /></td>) Linux -> Bash : http://tinyurl.com/2ukkge
Your post breaks forumbot
[11:19:01 AM] <Forum> ( <td widt° 56' N, 11° 35' O</span><br /></td>) Linux -> Bash : http://tinyurl.com/2ukkge
Your post breaks forumbot
- Tim Blokdijk
- Posts: 1242
- Joined: 29 May 2005, 11:18
Thanks for the reply's 
I'm trying to set up an effective and automated site development environment at newspring.clan-sy.com.
The idea is to have a script to replace the site with a svn revision of choice.
So the script would do a checkout of the www-root dir in svn and move it to the site dev. env. remove the .svn stuff update the database and copy extra data like the forum avatars and wiki pictures to it.

I'm trying to set up an effective and automated site development environment at newspring.clan-sy.com.
The idea is to have a script to replace the site with a svn revision of choice.
So the script would do a checkout of the www-root dir in svn and move it to the site dev. env. remove the .svn stuff update the database and copy extra data like the forum avatars and wiki pictures to it.
- Tim Blokdijk
- Posts: 1242
- Joined: 29 May 2005, 11:18