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.
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:
DO NOT RUN this command! THIS WILL CHECK IN ALL CHANGES IN THE CURRENT DIRECTORY TO SUBVERSION WITH A TERRIBLE COMMIT MESSAGE!!!!!!!!!!!!!!! DON'T DO IT! YOU'VE BEEN WARNED!
Fetch comical VC commit messages from whatthecommit.com
The result of this command is a tar with all files that have been modified/added since revision 1792 until HEAD. This command is super useful for incremental releases.
Kudos to xakon.
M - current revision, N - older revision
Let's supose some moron used some m$ shit to commit to a later svnsynced repo. On a svn sync all his message logs cause a svnsync: Error setting property 'log': this commands finds all its contributions and fix all his commit logs
This will recursively add files/directories in SVN.
Notice: It might not work properly, and not all files could get added.
Since there is a limit on characters, I couldn't add failure/success notices.
If you want failure/success notices, download Terminal Enhancements (http://tenhancements.tk/ )
It is included on Base Features
This should handle whitespaces well and will not get confused if your filenames have "?" in them
list top committers (and number of their commits) of svn repository.
in this example it counts revisions of current directory.
Standard command, but I always have to search for it... ;-)
When working on a big proeject with SVN, you create quite much files, for now! Can just sit here and type svn add for all of them!
svn status will return a list of all of file which get ?(not add), "M"(Modified), "D"(Deleted)! This code just grep "?" flag, then add it into SVN again!
This command can be used to revert a particular changeset in the local copy.
I find this useful because I frequently import files into the wrong directory. After the import it says "Committed revision 123" or similar. to revert this change in the working copy do:
svn merge -c -123 .
(don't forget the .) and then commit.
No need for grep, let awk do the match. This will not behave properly if the filenames contains whitespace, which is awk's default field separator.
Use color escape sequences and sed to colorize the output of svn stat -u.
svn stat characters: http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.ref.svn.c.status
GNU Extensions for Escapes in Regular Expressions: http://www.gnu.org/software/sed/manual/html_node/Escapes.html
This command will output the total number of files in a SVN Repository.
Dumps a compressed svn backup to a file, and emails the files along with any messages as the body of the email