Working on Linux command line can be fun sometimes. Ubuntu Linux is used for all the examples. Enjoy at your own risk!:
1. Linux "sl" command
From the man page: "sl - display animations aimed to correct users who accidentally enter sl instead of ls."
$ sudo apt-get install sl
$ sl
(see image)
Animated steam locomotive loving across the screen from right to left. One can play a prank on someone by:
$ alias ls=sl
2. Linux "yes" command
From the man page: "yes - output a string repeatedly until killed"
$ yes linux
linux
linux
linux
linux
^C
$
Why would we want a command to keep on printing a string all the life of the process? We can use "yes" command in certain scripts where we want to feed the same answer in a repeated operation. For example, we are doing an operating on a set of files and Linux asks us to confirm for each and every file. We can auto-feed a yes using the "yes" command.
3. Linux "rev" command
From the man page: "rev — reverse lines of a file or files"
It reverses all the input strings given to it line by line. To play around, type the command "rev" on the command prompt and press enter:
$ rev
Linux
xuniL
google+
+elgoog
^C
$
This command also takes the input in the form of a file, where it reverses all the strings line wise in the file and prints the output to the standard output:
$ cat strings.txt
Linux is so much fun!
Happy Birthday
$ rev strings.txt
!nuf hcum os si xuniL
yadhtriB yppaH
4. Linux "fortune" command
From the man page: "fortune - print a random, hopefully interesting, adage"
The fortune command is in the same lines as fortune cookies. We get a random adage or a message when we run this command:
$ sudo apt-get install fortune
$ fortune
You have the power to influence all with whom you come in contact.
$ fortune
You'd like to do it instantaneously, but that's too slow.
5. Linux "figlet" command
From the man page: " FIGlet - display large characters made up of ordinary screen characters"
This displays our input string in large characters as banners formed out of ASCII characters:
$ sudo apt-get install figlet
$ figlet Google+
(see image)
One can add such banners in the scripts headers or sources using "figlet".
6. Linux "toilet" command
From the man page: "TOIlet - display large colourful characters"
It's a very colourful command. Similar to "figlet", it displays our text as banners but in a prettier way:
$ sudo apt-get install toilet
$ toilet Google+
(see image)
It has some colours to offer too. Let's see by running following command:
$ toilet -f mono12 -F metal Google+
(see image)
7. Linux "cowsay" command
From the man page: "cowsay/cowthink - configurable speaking/thinking cow (and a bit more)"
The "cowsay" command is an amusing command. It depicts the power of ASCII characters to draw a cow, sheep, and many other animals. However it might not always be present in every distribution of Linux:
$ sudo apt-get install cowsay
$ cowsay "Google+ is fun"
(see image)
Although the command name suggests a cow, it also offers to draw a sheep:
$ cowsay -f sheep "I too love Google+"
(see image)
To have all the capabilities as to what all animals it can draw, just use:
$ cowsay -l
Cow files in /usr/share/cowsay/cows:
apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default
dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala
mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep
skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey
turtle tux unipony unipony-smaller vader vader-koala www
Therefore, we can input any of the above animals with the "-f" option. To make it even more fun, one can pipe fortune message to cowsay:
$ fortune | cowsay
8. Linux "oneko" command
From the man page: "oneko - Creates a cute cat chasing around your mouse cursor."
With this command, we see a cat (Tom?) which is chasing our mouse (the mouse pointer, Jerry?):
$ sudo apt-get install oneko
$ oneko
(see image)
h/t +Rupali Sharma
Comments
Post a Comment