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

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.

Add your public SSH key to a server in one command
Just run the command, type your password, and that's the last time you need to enter your password for that server. This assumes that the server supports publickey authentication. Also, the permissions on your home dir are 755, and the permissions on your .ssh dir are 700 (local and remote).

Create a new file

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Paste OS X clipboard contents to a file on a remote machine
Redirects the contents of your clipboard through a pipe, to a remote machine via SSH.

Remove newlines from output
?Cat and grep? You can use only grep ("grep \. filename"). Better option is awk.

List only executables installed by a debian package
Maybe not clean with big package and too long argument. But return every file who can be executed.

Process command output line by line in a while loop
This snippet allows to process the output of any bash command line by line.

Get your outgoing IP address
should be very consistent cause it's google :-)

List the Sizes of Folders and Directories


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: