[plug] question about file types

David Campbell campbell at torque.net
Wed Jan 6 07:07:06 WST 1999


Date sent:      	Tue, 05 Jan 1999 14:44:33 -0700
From:           	"Tamara Thompson" <THOMPSON at gate.sunquest.com>
To:             	plug at linux.org.au
Subject:        	[plug] question about file types
Send reply to:  	plug at linux.org.au

> 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?

Use the "file" command. eg: "file /etc/hosts", it uses the contents of 
/etc/magic to determine the file type. Check /etc/magic for more info (it is 
readable).

> 2) is there a quick and easy way to restore the VGA settings?  

^V <ESC> c <RETURN> at a vitual console works. When I log onto one particular 
mud I used the above escape sequance in a macro (eg "say ^[c"). It is amazing 
how many people have a vt100 compatible console as people keep wondering why 
their screen cleared.

David Campbell
=======================================================
campbell at torque.net
Check http://www.torque.net/parport for all Linux parallel port solutions.

Current project list:
a) Get ZIP Plus drive back from waranty claim
b) Maintain Linux ZIP drivers (need to update docs)


More information about the plug mailing list