[comp.unix.questions] more knowledgeable unix "file" program

perry@ccssrv.UUCP (Perry Hutchison) (10/06/89)

In article <1989Oct4.160115.26561@agate.berkeley.edu>
jim@insect.berkeley.edu (Jim Bradley) writes:

> I would like a "file" program for unix that identifies
> more file formats that the Sun OS 3.5 version.

The file(1) command uses a file of "magic numbers" stored in /etc/magic
to recognize file formats.  Additional formats can be recognized by adding
appropriate entries there, or in an alternate "magic numbers" file
specified by the -m option.

marks@mgse.UUCP (Mark Seiffert) (10/08/89)

In article <712@ccssrv.UUCP> perry@ccssrv.UUCP (Perry Hutchison) writes:
>In article <1989Oct4.160115.26561@agate.berkeley.edu>
>jim@insect.berkeley.edu (Jim Bradley) writes:
>
>> I would like a "file" program for unix that identifies
>> more file formats that the Sun OS 3.5 version.

This brings up something i have been wondering about for some time. SCO's
Xenix has a "file" program, but it only knows so many types. I sometimes
FTP files from BSD systems and loose part of the filename because of the 
Xenix filename length limit. SCO does not recognize compressed files at,
it just says data. Is the source for a file like program available on the
net? Is there a BSD file program that is free of AT&T code?

>
>The file(1) command uses a file of "magic numbers" stored in /etc/magic
>to recognize file formats.  Additional formats can be recognized by adding
>appropriate entries there, or in an alternate "magic numbers" file
>specified by the -m option.

On Xenix, the file man page says;

	.
	.
	.
	  If the -f option is given, file takes	the list of filenames
	  from namesfile. If the -m option is given, file sets the
	  access time for the examined file to the current time.
	  Otherwise, the access	time remains unchanged.
	.
	.
	.
     Credit
	  This utility was developed at	the University of California
	  at Berkeley and is used with permission.
-- 
Mark Seiffert,  Metairie, LA.
uucp:           rex!mgse!marks
bitnet:         marks%mgse@REX.CS.TULANE.EDU
internet:       marks%mgse@rex.cs.tulane.edu

chittamu@umvlsi.ecs.umass.edu (Satish Kumar .C) (10/11/89)

>
>specified by the -m option.
The file is /usr/lib/file/magic, I believe.


-- 
	-Satish.
	chittamu@cs.umass.edu