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

Rename files in batch

Terrorist threat level text
This line provides the same result by reading the output of a less arbitrary value. This is a personal choice on the matter, and the result on different machines may vary.

Mapreduce style processing
parallel can be installed on your central node and can be used to run a command multiple times. In this example, multiple ssh connections are used to run commands. (-j is the number of jobs to run at the same time). The result can then be piped to commands to perform the "reduce" stage. (sort then uniq in this example). This example assumes "keyless ssh login" has been set up between the central node and all machines in the cluster. bashreduce may also do what you want.

Remote execute command as sudoer via ssh
Example: remote install an application(wine). sshpass -p 'mypssword' ssh -t mysshloginname@192.168.1.22 "echo 'mypassword' | sudo -S apt-get install wine" Tested on Ubuntu.

run command on a group of nodes in parallel

list files recursively by size

32 bits or 64 bits?
Easy and direct way to find this out.

Check the hard disk vendor and model on Apple Mac

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

find and delete files smaller than specific 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: