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

Write on the console without being registered
just use a space to prevent commands from being recorded in bash's history on most systems

Coping files, excluding certain files
Preserve file structure when coping and exclude some file o dir patterns

Go to the Nth line of file [text editor]
This is not printing, real editing using the text editor.

A line across the entire width of the terminal
Use tput cols to find the width of the terminal and set it as the minimum field width.

Superfast portscanner

search for a file in PATH

Get pages number of the pdf file

Re-use the previous command output
The $(!!) will expand to the previous command output (by re-running the command), which becomes the parameter of the new command newcommand.

list files recursively by size

ffmpeg command that transcodes a MythTV recording for Google Nexus One mobile phone
This command will transcode a MythTV recording. The target device is a Google Nexus One mobile phone. My recordings are from a HDHomerun with Over The Air content. Plays back nicely on the N1.


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: