anonymous
  • anonymous
Should I use cat or less for viewing text files in Unix?
Computer Science
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
cat [file] prints the file to stdout, whereas less [file] opens it up for viewing, like a manpage
anonymous
  • anonymous
you said what i wanted to say, so why you asking? lol
anonymous
  • anonymous
I don't know which is the best option :(

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
i never use cat for viewing because it will spam my terminal but maybe you need sometimes to print something to terminal then you can use it
anonymous
  • anonymous
It depends on the context where you use the file to display.. you can even use VI filename on the terminal to see as well as edit just like edit in windows..
rsmith6559
  • rsmith6559
If two commands are equivelant to you, the better one is in the /bin directory (as opposed to /usr/bin or /usr/local/bin), or on the recovery disk for your system. That way, if things go south, you won't be "out of your usual" while trying to repair it.
anonymous
  • anonymous
Less is better
farmdawgnation
  • farmdawgnation
Use both! cat filename | less :D
anonymous
  • anonymous
I agree that it depends on the context. If the file is small, cat it because less requires an extra keystroke to escape. If the file is larger and you need to jump to a specific section, less is better. Now if you just want the end of a file, you can use tail. The various options exist because they each have their use.

Looking for something else?

Not the answer you are looking for? Search for more explanations.