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

delete all leading and trailing whitespace from each line in file

Given process ID print its environment variables
Same as previous but without fugly sed =x

Get a facebook likes quantity from CLI
Replace the with your URL, for example http://rublacklist.net/12348/ and it will show likes number

Is today the last day of the month?
Nice simple example of something we can do in bash.

Url Encode
Converts reserved characters in a URI to their percent encoded counterparts. Alternate python version: $ echo "$url" | python -c 'import sys,urllib;print urllib.quote(sys.stdin.read().strip())'

draw matrix using dot

To print a specific line from a file
You can get one specific line during any procedure. Very interesting to be used when you know what line you want.

Reinstall Grub

run shell with your commandlinefu.com's favourites as bash_history
This makes your commandlinefu.com's favorites appear as most recent commands in your history.

Hide files in ls, by adding support for .hidden files!
Sometimes I would like to see hidden files, prefix with a period, but some files or folders I never want to see (and really wish I could just remove all together).


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: