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:
adding users to groups on OS X is not a straightforward process, you need to use the new in built in Directory Service command line utility...
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
since awk was already there one can use it instead of the 2 greps. might not be faster, but fast enough
this is the much easier zsh equivalent ...
This command will enable dns spoofing through ettercap. The etter.dns config file must be set. The -i parameter defines the interface, e.g. eth0, eth1, wlan0...
ettercap -h for more info
Credit goes to xhabie-crew
This was done in csh.
Generates a qr Code from a textfile and saves the code as png. Works with any ASCII file (obviously)
Converts red-cyan 3D anaglyphs to side-by-side format viewable by crossing your eyes. Useful for people who don't have 3D glasses or prefer not to use one.
Using PHP shell to URL decode a string.
Note that in the command N is, for instance, 37.
This will search for "string" in all files under the given path "." and provide a listing of the files with their relative locations.
Saves all the "cut" hacks
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
'booklet' is the name they'll give it in fineprint windows alternative. It's a postscript file prepared to be printed dual side, one page per sheet, and, once finished you can place staples in the middle of the print, fold, and read it like a book.
All Linux Systems I try also have an empty line per cpu in /proc/cpuinfo... little shorter then...
This one line Perl script will display the smallest to the largest files sizes in all directories on a server.
Full output in one single git command, no pipes nor other process invocations.
Will also work under cmd on Windows, with MSysGit, and can be aliased, simply add
branch-rel = "for-each-ref --sort=-committerdate --format='%1B[32m%(committerdate:iso8601) %1B[34m%(committerdate:relative) %1B[0;m%(refname:short)' refs/heads/"
to your .gitconfig file.
Recursively list all files in the current directory & get their md5sum, even if the filename has bad characters.
Edit the YOURPROJECTHERE and YOURPACKAGEHERE and you're done.
This is pretty simple but every time I forget how to do it, so let's stick it here.
Requires ImageMagick to be installed; mogrify is the lesser-known sibling to convert -- it overwrites your original images, but allows you to work on batches of files without resorting to a loop.