commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
There are 2 alternatives - vote for the best!
man find: If no paths are given, the current directory is used. - Can anybody tell me why so many people are typing the dot?
Recursively remove .svn directories from the current location.
If you can do better, submit your command here.
You must be signed in to comment.
It took 6 times to get this simple command right? And i hate to break it to you, but you should be using "svn export" anyway, especially since you're likely to have your working copy in some special location for working copies only
No idea what gt3 is trying to say, but... Downvoting this because it does not work. The -delete option won't remove nonempty directories, at least on my system. and .svn directories will always be nonempty. You could try to contort find to your will, but -prune won't work with -delete. You have to do something like the solution by nishan_n (#4917).
bwoodacre, if you click the title of the cmomand 'Recursively remove .svn directories' there's 5 previous attempts by other people to do this command on commandlinefu.com. That's what I meant by "it took 6 times".
However, you're correct, this command is wrong and will report "Directory not empty". I should have said that nishan_n had it closer but i still think people should just use 'svn export' if they want to get rid of the .svn directories safely.
You are right, the suggestion to use svn export is easier and less error-prone if you just want a .svn-free version of a particular chunk of a *repository*. But that doesn't handle any differences that your working copy has: unversioned files that you want to keep around, or checked-in files with changes that you don't want committed.