cancel
Showing results for 
Search instead for 
Did you mean: 

more and cat

SOLVED
Go to solution
Erick Flores Rivas
Occasional Contributor

more and cat

my question is what files can open the command (cat) that the (more) can't

7 REPLIES
Steven E. Protter
Exalted Contributor

Re: more and cat

Shalom,

Check the man pages, but the two commands should be able to open the same file types.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: more and cat

Both can open the same type of files.

The difference is that 'cat' will output the file to your terminal without stopping. 'more' will output the file and stop at the end of each page (based on your terminal settings).
Steven Schweda
Honored Contributor
Solution

Re: more and cat

Have _you_ found any difference?

On what? "uname -a"?

Is there some problem which you are trying to
solve?
Bill Hassell
Honored Contributor

Re: more and cat

If the user is allowed read access, then cat and more can read any file in the system. That said, there are many files (binary, directories, device files, etc) that should not be read. The reason is that most terminals and emulators will react to certain character combinations that can clear the screen, start printing garbage on the printer, lock the keyboard, etc.

So depending on the version of HP-UX you are running, cat and more might reject certain binary files such as a directory (which is also a file).


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: more and cat

(Please select a more appropriate forum for your questions. This and your other two have nothing to do with security. A better forum is general or sysadmin.)

Not that this is useful but cat(1) can read directories and more(1) has a nice error:
/ is a directory

But in general more(1) is used browsing.
cat(1) is more of a filter, or a mistaken use as evil cat. ;-)
Viktor Balogh
Honored Contributor

Re: more and cat

If 'cat' and 'more' don't help (you are trying to view a binary file), the you can try with the 'strings' command.
****
Unix operates with beer.
James R. Ferguson
Acclaimed Contributor

Re: more and cat

Hi:

> If 'cat' and 'more' don't help (you are trying to view a binary file), the you can try with the 'strings' command.

The 'strings' command simply looks for four or more ASCII printing characters in sequence. If it finds such a sequence, it prints it. While useful, there is no guarantee of the amount of information about a file you will be able to expose.

Regards!

...JRF...