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

Check if your desired password is already available in haveibeenpwnd database. This command uses the API provided by HIBP

Show a Package Version on Debian based distribution
if you don't want to show string "version?, then use awk or cut filter it: apt-cache show pkgname | grep -i "version:" | awk '{ print $2 }' we can also use regex to search many packages and show their versions: apt-cache search pkgregex | grep -i "version:"

Copy your SSH public key on a remote machine for passwordless login.
Should run on any system with ssh installed.

Scroll up (or Down (PgDn)) in any terminal session (except KDE)

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

Alert on Mac when server is up
When run on a mac, this command will bring up a dialog box in the Terminal when server HOSTNAME first responds to a ping.

Show numerical values for each of the 256 colors in bash
Same as http://www.commandlinefu.com/commands/view/5876, but for bash. This will show a numerical value for each of the 256 colors in bash. Everything in the command is a bash builtin, so it should run on any platform where bash is installed. Prints one color per line. If someone is interested in formatting the output, paste the alternative.

backup local MySQL database into a folder and removes older then 5 days backups

alt + 1 .
alt + number + dot will insert last command argument at $number place, alt + 0 + . will print last command name. For example $ ls /tmp /var $ ls /usr /home alt + 1 + . will result in '/usr' , if you press alt + . again, it will result in '/tmp' alt + 0 + . -> 'ls'

Quick HTML image gallery
More compact and direct.


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: