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

Get a range of SVN revisions from svn diff and tar gz them
Handy when you need to create a list of files to be updated when subversion is not available on the remote host. You can take this tar file, and upload and extract it where you need it. Replace M and N with the revisions specific to yours. Make sure you do this from an updated (svn up) working directory.

connect via ssh using mac address
Connect to a machine running ssh using mac address by using the "arp" command

Make a file not writable / immutable by root
http://linuxhelp.blogspot.com/2005/11/make-your-files-immutable-which-even.html

Colorize matching string without skipping others
this is useful to highlight only some code without losing other lines (eg. software, logs, scripts)

Instant mirror from your laptop + webcam (fullscreen+grab)
This directly puts the "mirror" into fullscreen, and lets you take photos by pressing the 's' key. I bet appearance conscious people will have keyboard shortcut for this command by now.

Youtube-dl gone stale on you/stopped working (Ubuntu)?
If you update youtube-dl from the repos, it becomes out-of-date quickly. Luckily, it can auto-update.

suspend to ram without root
$dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

Suppress output of loud commands you don't want to hear from
This works even if there are spaces in any word in the command line.

Watch how many tcp connections there are per state every two seconds.
slighty shorter

Sort a character string
Sorts a character string, using common shell commands.


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: