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

Grep colorized
Highlights the search pattern in red.

Have an ssh session open forever
Open a ssh session opened forever, great on laptops losing Internet connectivity when switching WIFI spots.

Copy files from multiple directories into one directory

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

Put a console clock in top right corner
Gives not only date but also some interesting status about the System

Google Translate
Usage: $ translate Example: $ translate hello en es See this for a list of language codes: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

See a full list of compiler defined symbols
From http://lists.debian.org/debian-devel/2001/01/msg00971.html .

Rescan partitions on a SCSI device
Used this after cloning a disk with dd to make the newly written partitions show up in /dev/

list block devices
Shows all block devices in a tree with descruptions of what they are.

do something else while waiting for an event, such as reboot
until (ssh root@10.1.1.39 2> /dev/null); do date; sleep 15; done In this case will execute "date" then "sleep 15" until we are able to ssh into server, such as after a reboot Could also be like: until ( ping 10.1.1.39 1> /dev/null); do echo "server 10.1.1.39 is down"; sleep 15; done


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: