Commands using echo (1,545)

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

Look for IPv4 address in files.
It finds a SNMP OID too :-(

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

Extract JPEG images from a PDF document
This will extract all DCT format images from foo.pdf and save them in JPEG format (option -j) to bar-000.jpg, bar-001.jpg, bar-002.jpg, etc. Inspired by http://stefaanlippens.net/extract-images-from-pdf-documents

View the latest astronomy picture of the day from NASA.
Substitute feh for the image viewer of your choice. display (part of imagemagick) seems to be a popular choice.

Netcat & Tar
Create a tarball on the client and send it across the network with netcat on port 1234 where its extracted on the server in the current directory.

HTTP Get of a web page via proxy server with login credentials
If you are behind a proxy server and have to authenticate with proxy server to browser web pages then you have to pass proxy server address and its port number along with user credentials to curl to got GET the page using curl. Example : "curl -U srikanth -x 167.85.103.70:8080 http://www.yahoo.com". In case you don't specify the password (as in the above example), curl will prompt to enter the password at the command line.

Creates a proxy based on tsocks.

Limit the transfer rate and size of data over a pipe
This example will close the pipe after transferring 100MB at a speed of 3MB per second.

Display formatted routes

Compare copies of a file with md5
I had the problem that the Md5 Sum of a file changed after copying it to my external disk. This unhandy command helped me to fix the problem.


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: