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

random xkcd comic
i sorta stole this from http://www.shell-fu.org/lister.php?id=878#MTC_form but it didn't work, so here it is, fixed. --- updated to work with jpegs, and to use a fancy positive look behind assertion.

List the libraries used by an application
For example, you need to make a copy of all the libraries that a certain application uses, with this command you can list and copy them.

Read all the S.M.A.R.T. data from a hard disk drive
This is to pull all the saved S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) information from a hard drive. This can give you an idea of the nature and extent of an issue on a failing hard drive.

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

Copy all documents PDF in disk for your home directory
I used this to copy all PDFs recursively to a selected dir

ssh autocomplete
Autocomplete from .ssh/config

Get the date for the last Saturday of a given month
If your locale has Monday as the first day of the week, like mine in the UK, change the two $7 into $6

Compare directories via diff
http://hints.macworld.com/article.php?story=20070408062023352

Copy something to multiple SSH hosts with a Bash loop
Just a quick and simple one to demonstrate Bash For loop. Copies 'file' to multiple ssh hosts.

list files recursively by size


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: