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

find previously entered commands
Searches bash-history in reverse order (last entered commands first). Pressing ctrl+r again shows the next matching entry.

Use lynx to run repeating website actions
This command will tell lynx to read keystrokes from the specified file - which can be used in a cronjob to auto-login on websites that give you points for logging in once a day *cough cough* (which is why I used -accept_all_cookies). For creating your keystroke file, use: $ lynx -cmd_log yourfile

Find the package that installed a command

Boooted as EFI/UEFI or BIOS

Summarize the number of open TCP connections by state
Useful for checking the number and state of TCP connections.

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

Send a local file via email
Another way of sending an attachment. -s : subject file : file to be sent

Copy an element from the previous command
'n' is a non-negative integer. Using 0 will expand to the name of the previous command.

Add the time to BASH prompt
Adds the time in 12hr AM/PM format to the beginning of a prompt. Change \@ to \t for 24-hour time or \T for 12hr without AM/PM. To keep the time the next time you open a terminal, edit ~/.bashrc and stick the command at the bottom.

show ALL iptable rules
show your current iptable rules from every available iptable table


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: