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

Download streaming video in mms
require mimms package

Revert an SVN file to previous revision
M - current revision, N - older revision

List the size (in human readable form) of all sub folders from the current location

Enter your ssh password one last time
Enter your ssh public key in the remote end for future key-based authentication. Just type your password one last time. The next time you should be able to login with the public key. If you don't have a key, generate one with ssh-keygen. Requires Bourne-compatible shell in the remote end.

Show what a given user has open using lsof

take a look to command before action
add |sh when you agree the list, I often use that method to prevent typos in dangerous or long operations

Increase SCT of external USB disk enclosure to one hour.
So I had this 2TB Seagate external disk/USB enclosure which by default would spin-down its internal drive (it enters a standby mode) after four minutes of inactivity.. Spinning-up the inactive drive was an annoying delay when accessing files and also it severely interfered with NFS.. SCT stands for "Standby Condition Timer". To completely disable SCT: $ sdparm --clear STANDBY -6 /dev/sdb To return to original (default) SCT settings: $ sdparm -D -p 0x1a -6 /dev/sdb To verify the settings (before and after): $ sdparm -a /dev/sdb No need for vendor-provided MSWIN tools, etc.

Compare a remote file with a local file
Useful for checking if there are differences between local and remote files.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Remove invalid key from the known_hosts file for the IP address of a host
Quick shortcut if you know the hostname and want to save yourself one step for looking up the IP address separately.


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: