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

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

aptitude easter eggs
this is a reference to Antoine de St. Exupery's "The Little Prince"

Have your sound card call out elapsed time.
Useful contexts : You are doing yoga or some other physical training in which you are holding a position. Or you practice the pomodoro productivity technique. Or your girlfriend said "We're leaving in 40 minutes". Design details: sleep executes before espeak to give you a 5 seconds head start. espeak is run in the background so it doesn't mess up the timing.

Mount a VMware virtual disk (.vmdk) file on a Linux box
Assumes XP/2000/2003. For Server 2008+ try offset=105,906,176 You can find this number in the System Information utility under Partition Starting Offset. UEFI based boxes you want partition 2 since the first is just the boot files (and FAT). This works with (storage side) snapshots which is handy for single file restores on NFS mounted VMware systems

Convert PDF to JPG
(relies on 'imagemagick') This command will convert all .pdf files in a directory into a 800px (wide or height, whichever is smaller) image (with the aspect ratio kept) .jpg. If the file is named 'example1.pdf' it will be named 'example1.jpg' when it is complete. This is a VERY worthwhile command! People pay hundreds of dollars for this in the Windows world. My .jpg files average between 150kB to 300kB, but your's may differ.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Update pandoc via cabal
An alternative to built-in package manager, keep pandoc in sync with upstream releases.

Check if system is 32bit or 64bit
Needed a quick way to see if my server distro that I setup years ago was running 32bit or not, since with time I had forgotten. Note: does not check _hardware_ e.g. /proc/cpuinfo but rather the kernel installed

Download files linked in a RSS feed
The difference between the original version provided and this one is that this one works rather than outputting a wget error

Rot13 using the tr command
rot13 maps a..mn..z (A..MN..Z) to n..za..m (n..za..m) and so does this alias.


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: