All Posts Linux

Published on September 3rd, 2012 | by Vaibhav

0

Interesting Linux Commands!

1) Generate Random Passwords:

We often run out of passwords and are unable to think of new passwords. Now Linux can help us here. Just type the command in the terminal to generate the password according to our specifications and requirement.

 < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6

 By changing the last flag we may change the number of characters needed in the password. Note that the 6 in ‘-c6′ stands for the number of characters, and the command may be suitably altered so as to specify the correct purpose. If we want only lowercase or UPPERCASE (or BoTh!), or we want to include or exclude numbers, then the correct symbols may be included or excluded. Note that it refers only to the part ‘_A-Z-a-z-0-9′ in the command.

 2) Notifying Scripts:

 You may have seen display of the text as the notification for Volume or Network. We can imitate this by using the “notify-send” in Linux. To use this, type in the Terminal:

 notify-send “Hello World”

Using inverted commas, we specify that it is a single phrase. So the output too will be on a single line. If we use do not use the commas then the output is displayed on two different lines. Try it out as

 notify-send Hello decoding

 We can also specify the time for which it must be displayed (by using the -t option) and the icon for it as a thumbnail (by using the -i icon_pathname option).

notify-send Decoding http://decodingtech.com -t 15 -i /home/decoding/decoding.ico

 If you don’t have the package installed, install it with:

 sudo apt-get install libnotify-bin

 For other options just view the man page for notify-send by

 man notify-send

 Try using “0” time as “-t 0” and find out what happens!

 3) Wanna hide that command?

 Yes it is possible! You can hide your command in the Terminal by typing in:

 stty -echo

 To enable viewing again type in:

 stty echo

Note: This setting automatically is reverted when you close the Terminal.


About the Author

Vaibhav is an free software enthusiast and likes to try out new things in the free software world. When he is not working on a computer, he likes to play games like chess and badminton.



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Back to Top ↑