All commands (14,187)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

a function to find the fastest DNS server
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.

Rename files in batch

Replace all tabs with spaces in an application
Note that this assumes the application is an SVN checkout and so we have to throw away all the .svn files before making the substitution.

Extract android adb ab backup to tar format (only works for non encrypted backups)

Kill any process with one command using program name
Somtime one wants to kill process not by name of executable, but by a parameter name. In such cases killall is not suitable method.

Replace all forward slashes with backward slashes
Use -i option to edit directly a file: sed -i 's|\/|\\|g' file

Generate random password on Mac OS X
Feel free to put this in your ~/.profile: $ random(){ cat /dev/urandom | env LC_CTYPE=C tr -dc $1 | head -c $2; echo; } Then use it to generate passwords: $ random [:alnum:] 16 Or DNA sequences: $ random ACGT 256

connects to a serial console
e.g., 'screen -L /dev/ttyUSB0 38400' listens to your Holux M-241 GPS logger and turns on automatic logging

Print the contents of $VARIABLE, six words at a time
Print out the contents of $VARIABLE, six words per line, ignoring any single or double quotes in the text. Useful when $VARIABLE contains a sentence that changes periodically, and may or may not contain quoted text.

Tweet from Terminal to twitter !
Tweeting from terminal to twitter accounts..


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: