I used to use cat
to view files. Then I learned that less
is usually better, and is a must if the file is longer than a few dozen rows.
My question: Is there ever a reason to use cat
instead of less
? Is there any situation where cat
is a better solution?
Best Answer
I personally prefer
view
for static content ortail -f
for dynamic content.This does not answer your question, though. There is a saying "why use more if you have less" ;-)
But there are cases where I prefer cat to less: I usually work with X11-windows. These windows have a scroll-buffer which can be set to some hundred lines.
Doing a
cat
for - let's say 200 lines and then using the mouse with the scroll-bar is more comfortable to me than usingless
in these cases.