[plug] question about file types

Alastair Irvine alastair at ucc.gu.uwa.edu.au
Wed Jan 6 09:20:55 WST 1999


On Tue, 05 January, 1999 at 02:44:33PM -0700, Tamara Thompson wrote:
> This is just a minor annoyance, but when I'm exploring my Redhat system,
> sometimes I can't tell by the ls -l whether a file is a binary or a
> script.  So I just 'more' 'em.  Problem is, <sheepish grin> as often as
> not I open a binary file and it mucks up my console.  Total garbage on
> screen, as if the font has been changed to hieroglyphs.  
> 1) is there a way to determine if a file is a readable script or a binary?
> 2) is there a quick and easy way to restore the VGA settings?  
> Logging out and back in fixes it, but seems rather inelegant to me.

You could try using "less".  It's like "more" (only a lot better) and it
should be installed by default on just about any Linux system.  If the file
you are about to view is a binary, less will ask you if you really want to
view it.  (And if you do, it won't screw up your terminal.)

PS -- I like vim.  I filled (word-wrapped) Tamara's paragraph and it
      automatically put in the "> "s.

-- 
 _______________________________________________________________________ 
|                                                                       |
|  -=*Alastair Irvine*=-   WWW page: http://members.xoom.com/alastair/  |
|  System Administrator         Magic:tG player, coder, RPGer, net-nut  |
|  e-mail: alastair at ucc.gu.uwa.edu.au or alastair.irvine at usa.net        |
|_______________________________________________________________________|



More information about the plug mailing list