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

Change pidgin status
Changes pidgin status using its dbus interface. The status code can be obtained using command #4543.

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

Add temporary entry to authorized_keys
If you frequently need to connect to your ubersecure mainframe from various uberunsafe machines, you have to face difficult decision: (a) type the password everytime during the session (lame), (b) add local public key to mainframes authorized_keys file (unsafe), (c) as above, but remove this key at the end of the session (pain in the a55). So let's say you save The Command to tempauth file in bin directory of your mainframe's account and make it executable. Then, while you're on one of these unsafe ones, do: $ cat $HOME/.ssh/id_rsa.pub|ssh 5z474n@mainframe.nl bin/tempauth 30 and password prompts stop the harassment for 30 minutes and you don't have to care to remove the unsafe key after that.

Monitor memory without top or htop
It repeats a command, such as free, every five seconds and highlights the differences

For when GUI programs stop responding..
man xkill

SAR - List the average memory usage for all days recorded under '/var/log/sa/*' using sar -r.

Verify MD5SUMS but only print failures
All valid files are withheld so only failures show up. No output, all checks good.

Extract track 9 from a CD
Using mplayer to extract audio file from a CD

Deleting / Ignoring lines from the top of a file
Output lines starting at line 2.

grep for minus (-) sign
Use flag "--" to stop switch parsing


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: