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

Get NFL/MLB Scores/Time
change the nfl in the url to mlb or nba to get those score/times as well

Look at your data as a greymap image.
Keep width to a power of 2 to see patterns emerge. 512 is good. So is 4096 for huge maps. PNM headers are super basic. http://netpbm.sourceforge.net/doc/pbm.html

Google URL shortener
(1) required: python-googl ( install by: pip install python-googl ) (2) get from google API console https://code.google.com/apis/console/

prints line numbers
the sed way to print line numbers

Download an entire ftp directory using wget
If the username includes an @ you can use this one: wget -r --user=username_here --password=pass_here ftp://ftp.example.com

RTFM function
RTFMFTW.

last.fm rss parser
Quick and kludgy rss parser for the recent tracks rss feed from last.fm. Extracts artist and track link.

Cut/Copy everything arround brackets or parentheses on vim (in normal mode)
Put the cursor on either curly braces ( {, } ). Then press d% The d is delete command, and % is movement command that move the cursor to another matching parentheses (or curly braces in this case). This action will delete every character that was on the way of the movement (from the first curly braces to the second).

A fun thing to do with ram is actually open it up and take a peek. This command will show you all the string (plain text) values in ram

Periodic Log Deletion
deletes logs not modified in over [#] days - modify to compress or move, as needed


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: