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

Adding a startup script to be run at bootup Ubuntu
This script will run each time you boot up.The script must be in /etc/init.d directory.

Recover tmp flash videos (deleted immediately by the browser plugin)
Newer versions of the flashplayer browser plugin delete the tmp flash video immediately after opening a filehandle to prevent the user from "exporting" the video by simply copying the /tmp/FlashXYZ file. This command searches such deleted flash videos and creates symbolic links to the opened filehandle with the same name as the deleted file. This allows you to play your flash-videos (from e.g. youtube) with e.g. mplayer or copy the buffered video if you want to keep it.

Terrorist threat level text
This line provides the same result by reading the output of a less arbitrary value. This is a personal choice on the matter, and the result on different machines may vary.

Rename files with vim.
Opens a list of files in a text editor. Using Vim as your default editor allows you to use the power of regex substitution and visual block mode to batch rename files. Found in the renameutils package sudo apt-get install renameutils

Install pip with Proxy
Installs pip packages defining a proxy

FizzBuzz One-liner

Calculate days on which Friday the 13th occurs (inspired from the work of the user justsomeguy)
Friday is the 5th day of the week, monday is the 1st. Output may be affected by locale.

Rotate a video file by 90 degrees CW
Change video orientation in metadata only

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Replace php short open tags
Tired of front end developers using short open tags in your views? This will replace all instances of


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: