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:
Count on a specific port (80) - FreeBSD friendly.
-i sets the source file
-f and -acodec both set the output to be raw audio, PCM signed 16-bit little endian
find ip address in all files in /etc directory. can be used to find any string in any directory really
dumpfile is a CSV file, which its 1st field is a phone number in format CC+10 digits
Empty lines are deleted, before the output in format "prefix,ocurrences"
Creates a PDF file where each page will be a layer from de original TIFF file.
You can apply many other filters and transformations.
convert multi_layer.tif -page a4 -compress jpg multi_page.pdf
To set the page size
convert multi_layer.tif -crop 590x790+20+30 -compress jpg multi_page.pdf
To include only a portion of the image (discard first horizontal 20 pixels and first vertical 30 pixels, include the next 590 horizontal and 790 vertical pixels)
convert multi_layer.tif -delete 1,3,5-10 -compress jpg multi_page.pdf
Discard mentioned layers
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