unusual-linux-commands

Unusual linux commands can be very handy in several cases. Here are some of them.

Repeat the last typed command:

!!

 

Display file-content like cat, but from upside down, can be achieved with tac (reverse cat)

tac myfile.txt

 

Like to lookup in a dictionary file? Use look. Everything whats starts with the passed word will be shown.

look car

 

Display time / date in bash screen on right upper corner. Continously!

while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done &

 

Show all buildin commands

compgen -b

 

Show all commands you can run

compgen -c

utf8-encoded letters in email subject

You might have discovered strange characters in your email-subject like: Ã¼, Ã¤ or Ã¶, and so on?
That’s because you have sent them as UTF-8 and they are being interpreted as ISO-8859. Maybee the charters in the email’s body part are correct because you have already set a proper encoding! Well, the body and the subject needs a separate encoding. You can solve the problem by passing the subject string like below:

'=?utf-8?B?'.base64_encode('Subject with special chars like: äöü').'?='