Hide

What's this?

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/

Get involved!

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.

Hide

Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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:

Hide

News

2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - Test tweets
YU not working?
Hide

Tags

Hide

Functions

Commands tagged svn

Commands tagged svn from sorted by
Terminal - Commands tagged svn - 82 results
find . -type d -name DIR -exec rm -r {} \;
2009-03-04 14:49:21
User: miguelbaldi
Functions: find rm
Tags: svn cvs
-2

You can use this command to delete CVS/svn folders on given project.

svn st | cut -c 9- | parallel -X tar -czvf ../backup.tgz
2010-01-28 11:43:16
Functions: cut tar
-2

xargs deals badly with special characters (such as space, ' and "). In this case if you have a file called '12" record'.

Parallel https://savannah.nongnu.org/projects/parallel/ does not have this problem.

Both solutions work bad if the number of files is more than the allowed line length of the shell.

svn log -q | grep -v "^-" | cut -d "|" -f 2 | sort -u
xdg-open $(svn info | sed -n '/URL:/s/URL: //p')
lynx -dump -nolist http://whatthecommit.com/|sed -n 2p
2011-04-17 17:45:18
User: houghi
Functions: sed
-3

Fetch comical VC commit messages from whatthecommit.com

svn-clean
2011-06-26 18:17:17
User: rkulla
Tags: svn
-3

Wipes out unversioned files from SVN working copy. Much safer to run than your own incantations.

I find svn-clean especially useful for when "svn revert -R ." won't undo the many merged in new files. Manually rm'ing all the files with a status of '?' would be a hassle.

In debian at least, the svn-clean command comes with the subversion-tools package, otherwise you get the perl script with "svn export

tar --exclude='.svn' -c -f /path/to/file.tar /path/to/directory