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:
Ever wanted to stream your favorite podcast across the network, well now you can.
This command will parse the iTunes enabled podcast and stream the latest episode across the network through ssh encryption.
Aside from curl one will need iconv windows binary since windows lacks a native utf-8 cli interface. In my case I need a proxy in China and iconv to convert gbk status string into utf-8. GnuWin32 is a good choice with loads of coreutils natively ported to Windows
"FOR /f" is the solution to pass iconv output to curl.
Query the Socrata Open Data API being used by the White House to find any employee's salary using curl, grep and awk.
Change the value of the search parameter (example uses Axelrod) to the name of any White House staffer to see their annual salary.
Curl is not installed by default on many common distros anymore. wget always is :)
wget -qO- ifconfig.me/ip
If curl isn't available, use lynx.
With a lolcat favicon if you access it from your browser
Instead of having someone else read you the Digg headlines, Have OSX do it. Requires Curl+Sed+Say. This could probably be easily modified to use espeak for Linux.
In this example we search for 'vim' but vim doesn't have a project on github right now. That's ok, this command still searches for every project that has 'vim' in their description (forks, plugins, etc). To get XML or JSON output just replace 'yaml' in the url with 'xml' or 'json'.
Searches for web radio by submitted keyword and returns the station name and the link for listing .
May be enhanced to read user's selection and submit it to mplayer.
There's another version on here that uses GET but some people don't have lwp-request, so here's an alternative. It's also a little shorter and should work with most youtube URLs since it truncates at the first &
Request all information about my IP address in json format
Request all information about my IP address in xml format
you can use xmlstarlet to parse output instead of perl
This will tell you which twitter user you are chronologically. For example, a number of 500 means you were the 500th user to create a twitter account.
should be very consistent cause it's google :-)
use curl and sed to shorten an url via goo.gl
Validates and pretty-prints the content fetched from the URL.
This will send the web page at $u to email@example.com . To send the web page to oneself, firstname.lastname@example.org can be replaced by $(whoami) .
The "charset" is UTF-8 here, but any alternative charset of your choice would work.
`wget -O - -o /dev/null $u` may be considered instead of `curl $u` .
On some systems the complete path to sendmail may be necessary, for instance /sys/pkg/libexec/sendmail/sendmail for some NetBSD.