Less is not more
Windows users, as we all know, need Word for viewing text files. Advanced Windows users may use Notepad (now with ribbons 😄 ). Ubuntu users take OpenOffice. And Unix veterans use more.
Sitting beside such a Unix veteran can be painful.
UV: I told you it wouldn't work!
Cob: let's check the log files, shall we?
UV: hmhm.
Cob: would you just search /var/log/Xorg.0.log for capital double e?
UV: grep EE /var/log/Xorg.log | more
UV: oh... (types very carefully and slowly) grep EE /var/log/Xorg.log.0 | more
UV: damn 😉
Cob: You don't need to type that all the time, the bash remembers it. Just use the up arrow.
UV: oh. thx.
Cob: tab completion is another very useful convenience of the modern shell ...
UV: oh?
Cob: yeah, see? *type ... tab*
UV: hey, look at that! thx.
Cob: anyway, let's look at that log file
UV: right. *types very slowly* grep EE /var/log/Xorg.0.log |
Cob: STOP! You don't need more here. And why the FUCK are you using more anyway? Less exists since 1985! You can't even go backward with more! More is nothing but an anachronism!
UV: Well ... I don't know. But less sounds really less than more, doesn't it?
Cob: *tilt*
He's not even much older than I am. But a Solaris user. And a very nice guy in general. 😉
And what does the German Wikipedia say?
Really? I'd be thrilled to know which Linux distri is linking more to less. Mandriva doesn't. Debian and Ubuntu don't. OpenSuse? No. And ArchLinux certainly not. So, which one?
At the end of this rant (thx, I feel much better now), let me remind you of a few really nice features of less:
-
after less /var/log/Xorg.0.log, press 'F'. This replaces tail -f.
-
less '+/*holladiewildsau' *.pdf searches for "holladiewildsau" in all pdf files in the present directory. Go to the next hit with an 'n' (less follows vim in many of its commands).
-
you are in less, viewing a file, but changed your mind and want to edit it? Press 'v' 😉