Not long ago, I have listed here some useful Linux terminal commands and those that I described as deadly. This time, I decided to gather some commands that I think have no practical use. I know it sounds interesting but you may disagree with me on some of the commands that I'll list here as you may find a few of them useful. We can however agree to disagree as long as you explain to us why or how you find them handy.So without any more delay, here are several useless Linux terminal commands:
clear command
The clear command simply clears the terminal screen. I don't find it useful since hitting CTRL-L is the quickest way of clearing the terminal screen.
rev command
The rev command as described on its man page is a utility that 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.
As an example, I typed the sentence “Linux is fun” after the rev command, and here's the result:
As an example, I typed the sentence “Linux is fun” after the rev command, and here's the result:
$ rev
Linux is fun
nuf si xuniL
I've heard that rev has been used a long time ago in translating from or to languages that can be read from right to left. But now that the modern terminals can be set to display different languages correctly, I think rev has no practical use.
vdir command
The vdir command has the same output as the commonly used ls -lb. It lists the directory contents in alphabetical order along with information about the files. See the following examples:
$ vdir
total 60424
-rw-r--r-- 1 jun jun 111295 2009-07-20 22:46 img_0001.png
-rw-r--r-- 1 jun jun 384081 2009-07-20 22:45 img_0011.jpg
-rw-r--r-- 1 jun jun 451303 2009-07-20 22:45 img_0013.jpg
-rw-r--r-- 1 jun jun 468926 2009-07-20 22:45 img_0017.jpg
-rw-r--r-- 1 jun jun 443045 2009-07-20 22:45 img_0019.jpg
$ ls -lb
total 60424
-rw-r--r-- 1 jun jun 111295 2009-07-20 22:46 img_0001.png
-rw-r--r-- 1 jun jun 384081 2009-07-20 22:45 img_0011.jpg
-rw-r--r-- 1 jun jun 451303 2009-07-20 22:45 img_0013.jpg
-rw-r--r-- 1 jun jun 468926 2009-07-20 22:45 img_0017.jpg
-rw-r--r-- 1 jun jun 443045 2009-07-20 22:45 img_0019.jpg
ul command
Description from the man page: The ul utility reads the named files (or standard input if none are given) and translates occurrences of underscores to the sequence that indicates underlining for the terminal in use, as specified by the environment variable TERM.
$ cat hello.txt
hello_world
$ ul hello.txt
hello_world
The output is the same as using the cat command. "ul" was utilized back then on making underlined text readable, but at present I think it has become useless.
If you have other useless commands to add, please share them with us via comment.
"clear" is the only way (that I know of) to clear the screen in a RHEL5 rescue environment for example.
Does anybody use it instead of Ctrl-D to exit su or the terminal?
>> make
I run
>> clear;clear;make
so it puts a nice block of blank above the current compile output and its easy to see what I need to fix. Having this command in my history also makes it quicker to call up than hitting Ctrl-l twice then running make
Why? Because I use ctrl-d to exit various subshells that I use, e.g. from within vi etc, but I don't want my session to close just because I think I am in a sub-shell and I ctrl-d. I would rather require an explicit "exit" to indicate that I am logging completely off.
Try this:
ls *
echo *
@Carl: Ditto for ctrl+D
@Anonymous: yes is occasionally useful for getting past insecure futilities that need constant affirmation.
Commands are not for interactive use only, they are also used in scripts. And in a script there is nobody to press CTRL-L for you to clear the screen and start on a clear "page" again.
Same goes for exit, you need it to exit the scripts at various points (ex exit if some error occured that prevents the script to properly continue the operations). Also, you return an exit code using the same "exit".
find . -type f | while read F; do echo $(basename "$F" | rev)/$F; done | sort | cut -f2- -d/
It lists files sorted by their reverse filename. Useful if you want to group files by their extension before sending them to tar for example.
And as others have already said, clear is very useful in scripts. On the command line I usually use command[Ctrl-L][Enter], for example $ du -hs *[Ctrl-L][Enter]
/* aint telling what it does, its a surprise */
echo -e '____\b\b\b\btest' | ul
The reason for a GUI is to have more terminals :)
Not to say about shell scripts...
is in the terminal database, but control-L only works on a very small subset.
rev is often used to as a way of processing the end of a line first for sorting and such (ex. finding rhyming words, sorting by extention).
vdir does indeed provide duplicate functionality. So, it is purely a preference.
ul removes "underline" control characters, not underscore characters. The difference is that an underscore is a ASCII character (0x5F), while underscore control characters are teminal
specific depending on the terminal type. The point of this that when printing documents that
have embedded control sequences removing the control sequences can lead to much nicer looking
output. Historically, this sort of thing was the result of processing a document through nroff. The command col does a very similar thing.
Because, you do not use a command does not make it useless. It was probably useful to those who
created it. And if you lack understanding of ttys and such, it would be best to not pontificate about what is and is not useful.
Troy
Similarly, exit can be used to exit from a script.
didn't know today was Prickle-Prickle
$ eject ( to don't need to find such a little button to eject your cd's/dvd's )
$ lshw ( to know almost everything about your hardware )
$ shutdown -h -minutes- ( to power off your computer when you want )
$ nmap -sS -v -v -ip adress- ( after install it, know witch ports are open;) )
$ aircrack-ptw *.cap ( after install it, deencrypt wireless key with half packages than aircrack-ng )
$ fsck -vf /dev/hda1 ( change hda1 for your hard drive and realize that in Linux is almost no disk fragmentation )
And of course:
$ man -software- ( this one is the "holy bible" )
Cheers, have a nice day.
Alfons.
unstableme.blogspot.com