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

Complete TCP Handshake on a given host-port
Try to perform a fully TCP 3 way handshake on for a given host-port with a timeout of 1s.

Display packages and versions on Debian/Ubuntu distrib
Need admin right to run dpkg-query

Find the package that installed a command

list block devices
Shows all block devices in a tree with descruptions of what they are.

ls -qaltr # list directory in chronological order, most recent files at end of list
I find it very handy to be able to quickly see the most recently modified/created files in a directory. Note that the "q" option will reveal any files with non-printable characters in their filename.

List alive hosts in specific subnet
Works on any machine with nmap installed. Previous version does not work on machines without "seq". Also works on subnets of any size.

Run the last command as root
Useful when you forget to use sudo for a command. "!!" grabs the last run command.

Propagate a directory to another and create symlink to content
Lndir create from source directory to destination directory a full symlink tree of all contents of source directory, really useful for propagate changes from a directory to another.

OpenDns IP update via curl
Your IP is resolved by OpenDns Server (like a caller ID telephone, every server knows who is calling ;-) Change user:password by yours Be Happy

Go up multiple levels of directories quickly and easily.
This is a kind of wrapper around the shell builtin cd that allows a person to quickly go up several directories. Instead of typing: cd ../.. A user can type: cd ... Instead of: cd ../../.. Type: cd .... Add another period and it goes up four levels. Adding more periods will take you up more levels.


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: