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

play high-res video files on a slow processor
Certain codecs in high res don't play so well on my Dell Mini 9. Using this command, I can play just about anything and it keeps the sound in sync to boot!

Show drive names next to their full serial number (and disk info)

draw honeycomb
Fill the entire terminal screen. Is COLUMNS or LINES are undefined run "resize"

Revert an SVN file to previous revision
Kudos to xakon.

Silently deletes lines containing a specific string in a bunch of files
This command will find all occurrences of one or more patterns in a collection of files and will delete every line matching the patterns in every file

pretend to be busy in office to enjoy a cup of coffee
This will turn it in an infinite loop and also shows random words from a file, so it won't be the same each time and also not just a number.

Find files and calculate size of result in shell
Use find's internal stat to get the file size then let the shell add up the numbers.

Stop Flash from tracking everything you do.
Brute force way to block all LSO cookies on a Linux system with the non-free Flash browser plugin. Works just fine for my needs. Enjoy.

Write comments to your history.
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.

Display a list of RPMs installed on a particular date
Find out which RPMs were installed on a particular date. These would (naturally) include update RPMs. This example shows searching for "Thu 05 Mar" (with grep). Alternatively, pipe it to less so you can search inside less (with less's neat text highlighting of the search term): rpm -qa --queryformat '%{installtime} \"%{vendor}\" %{name}-%{version}-%{release} %{installtime:date}\n' | less # (this example) search term: Thu 05 Mar


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: