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:
command to find out the unused SVN repositories from the server via svnlook. This lists the when the last commit (HEAD revision) has happened in the repository.
handels @, ?, whitespaces in names.
replace "?" and "add" by "!" and "rm" for svn mass remove.
---> I m looking for a nicer way to write it, perhaps with something using " perl -ne '`blahblah` if /\?(.*)/' "
If you have ever edited a locally checked out version of a file to tweak it for testing purposes, and came back to it over a weekend, you might have forgotten what you exactly changed. This command helps you see the differences between the the checked in SVN version, and the one you tweaked.
simply change extension for others programming languages
List all svn externals dependencies of a specific project.
Number of files in a SVN Repository
This command will output the total number of files in a SVN Repository.
svn log -v --> takes log of all
Filter1
--------
-r {from}{to} --> gives from and to revision
Filter2
--------
awk of line 'r'with numbers
Assign user=3rd column [ie; username]
Filter3
--------
if username = George
print details
Filter4
--------
Print lines starts with M/U/G/C/A/D
[* A Added * D Deleted * U Updated * G Merged * C Conflicted]
Filter5
--------
sort all files
Filter6
-------
Print only uniq file's name alone.
afaik, svn doesn't have a good, scriptable way of telling you these two basic pieces of information.
dirrrty: use -p to chomp automatically, substitute all newlines away and then replace the "---" by a newline ? bingo!
s/// => s/// is just a cooler way to write s///, s/// which is just the small brother of s///; s/// (comma is an operator!)
have fun!
the output of svn log is annoying to grep, since it spreads the useful info over multiple lines. This compacts the output down to one line so eg you can grep for a comment and see the rev, date & committer straight away.
Helps if you accidentally deleted files from an svn repo with plain rm and you would like to mark them for svn to delete too.
otherwise you get this error message:
svn: Can't move '.svn/tmp/entries' to '.svn/entries': Operation not permitted
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
Fetch comical VC commit messages from whatthecommit.com
Requires html2text. Print bad, but often funny commit messages from whatthecommit.com
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.
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