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

Blue Matrix
Same as original, but works in bash

View non-printing characters with cat
Useful to detect number of tabs in an empty line, DOS newline (carriage return + newline). A tool that can help you understand why your parsing is not working.

Partition a sequence of disk drives for LVM with fdisk
So, I'm using a CentOS VM in VirtualBox, and created four new disks in the SCSI controller. The VM created the folders: /dev/sda /dev/sdb /dev/sdc /dev/sdd Using a 'for loop' all disks are partitioned for LVM.

Resize a Terminal Window
Replace 70 with the desired height. Replace 180 with the desired width. I put it in my bashrc, because by default my terminal is too small.

rename all images in folder with prefix of date and time from exif data
jhead is required

Google URL shortener
Shorter and made into a function.

Find files and calculate size of result in shell
Find files and calculate size with stat of result in shell

find the rpm package name that provides a specific file
For Linux distributions using rpm (eg Mandriva), this command will find the rpm package name that provides a file.

find and remove old compressed backup files
remove all compressed files in /home/ folder not created in the last 10 days

Throttle download speed (at speed x )
Throttle download speed $aria2c --max-download-limit=100K file.metalink Throttle upload speed $aria2c --max-upload-limit=100K file.torrent


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: