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

Insert a comment on command line for reminder
Comments can be used directly on the command line so I can save in the history a brief description of what command does.

create screencast (record text and audio simultaneously) using 'script' and 'arecord'
This shell function takes a single argument, which is used as the base name of the .wav, .timing and .session files created. To create a screencast: $ screencast test type and talk ... then type 'exit' or to exit the screencast. test.wav will contain the audio from your screencast. test.session will contain text and control characters needed to paint the screen test.timing will contain timing information needed to synch individual keystrokes in test.session with the audio. to play back: $ aplay test.wav & scriptreplay test.{timing,session} NOTE: because the shell function uses the variable "$!", and bash likes to expand '!' during history expansion, you will need to turn off bash's history before you enter the shell function. This can be achieved using the command $set +H

Install pip with Proxy
Installs pip packages defining a proxy

Convert diff output to HTML ins/del

Use a regex as a field separator awk

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Recursively compare two directories and output their differences on a readable format

Show exit status of all portions of a piped command eg. ls |this_doesn't_exist |wc

Find out which debian package a command (executable) belongs to on debian-based distros
This revision to my command (command #8851) was called for when it failed to find the parent package of 'rlogin', which is really a deep symbolic link to /usr/bin/ssh. This revision fixes this newfound issue, while ensuring fixes of other older issues work too.

Release memory used by the Linux kernel on caches
=1 --> to free pagecache =2 --> to free dentries and inodes =3 --> to free pagecache, dentries and inodes


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: