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

What is my public IP-address?
Short command, easy to remember

Instant mirror from your laptop + webcam
Flips the y-axis to emulate a real mirror, uses low resolution for speed, this will also hide blemishes and the like :)

Find the package a command belongs to on debian-based distros

move you up one directory quickly
In bash, this turns on auto cd. If a command is just a directory name, it cd's into that directory.

Monitoring sessions that arrive at your server

preprocess code to be posted in comments on this site
Assuming that $script contains the filename of a script you'd like to post as part of a comment on this site, this will prefix each line with '$' and pipe it into the X selection. From there just put the cursor in the right place in the comments box and middle-click. Should work pretty much anywhere with xclip installed. On debian-ish systems this is installed as part of the package "xclip".

Search back through previous commands
Searches backwards through your command-history for the typed text. Repeatedly hitting Ctrl-R will search progressively further. Return invokes the command.

clone a hard drive to a remote directory via ssh tunnel, and compressing the image

remote diff with side-by-side ordering.
more information: man sdiff

Output as many input
Output of a command as input to many


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: