Photo courtesy of yonmacklein
Like most of you, I’m a command line junkie. There are two advantages of using Linux command line instead of UI. First, you can automate lot of routine activities using command line and your productivity will increase drastically. Second, you’ll learn the internals of a particular feature (for example, configuring NIS) when you configure it using command line, instead of configuring it using UI.
While using command line intensively, following are the 4 Linux commands that I find practically useless. If you think they are useful, please explain a practical scenario under which you’ll use these commands with examples.
1. yes command
From man page: Repeatedly output a line with all specified STRING(s), or “y”
This command is totally useless, as the only thing it does is to repeatedly print either “y” or the user specified string until Control-C is pressed..
$ yes y y y y [Note: You have to press Control-C to stop the repeated y's]
$ yes my-input-string my-input-string my-input-string my-input-string my-input-string my-input-string [Note: You have to press Control-C to stop the repeated my-input-string's]
2. rev command
From man page: The rev utility copies the specified files to the standard output, reversing the order of characters in every line. If no files are specified, the standard input is read.
In the following example, I typed “this is very good”, which was reversed by rev command — “doog yrev si siht”
$ rev this is very good doog yrev si siht
In the following example, rev reversed the characters of the line inside the /etc/sysconfig/network file.
$ rev /etc/sysconfig/network sey=GNIKROWTEN bd-ved=EMANTSOH 1.1.01.01=YAWETAG
3. ul command
From man page: Translate underscores to underlining. The process will vary by terminal type. Some terminals are unable to handle underlining.
As shown below, when I tried ul command with a file that has underscores, nothing happened. Hopefully someone can explain the use of this command, as I didn’t find it useful.
$ cat test.txt test_is_good
The output of the ul command was exactly same as the cat output.
$ ul test.txt test_is_good
4. vdir command
vdir is same as ls -lb. Why do we need to use vdir when we have the ls command?
$ vdir total 244 -rw-r--r-- 1 root root 331 Jun 9 2006 access -rw-r--r-- 1 root root 0 Jun 9 2006 domaintable -rw-r--r-- 1 root root 64 Jun 9 2006 local-host-names -rw-r--r-- 1 root root 0 Jun 9 2006 mailertable
ls -lb command displays the exact output as the vdir command.
$ ls -lb total 244 -rw-r--r-- 1 root root 331 Jun 9 2006 access -rw-r--r-- 1 root root 0 Jun 9 2006 domaintable -rw-r--r-- 1 root root 64 Jun 9 2006 local-host-names -rw-r--r-- 1 root root 0 Jun 9 2006 mailertable
If you find a practical use for any of the above commands, please let us know. Also, if you can think of any other Linux commands that are not practically useful, please share in the comments below.
If you liked this article, please share it on deli.cio.us or StumbleUpon.