Administration Guide : Command-line manual pages

KATYPE(1) manual page


katype - determine file type


katype [ -c ] [ -s ] [ -m typefile ] file ...


Katype tests each argument in an attempt to classify it. It uses the same algorithm as FullPress to determine the Macintosh Finder Information, FileType and FileCreator for files resident in the UNIX filesystem. The main purpose of katype is to check the proper working of the file typing heuristics. See filetype(5) for a discussion of these. Flags include:
-m typefile
specifies an alternate file of specifications. This is useful when one wants to test the applied heuristics.
gives a test printout of the parsed form of the specification file. This is usually used in conjunction with -m to debug a new specification file before installing it.
Actually set the devined type and creator on the file. This is very similar to taking the normal katype output and using that as input for kats(1) Useful for scripts where files arrive from outside and need typing set before FullPress would run across the files during normal operation.


Katype does not show how a file is typed currently, only how it would be typed in the future. Use kats(1) to check and set the type of a particular file.


/usr/adm/appletalk/filetype - default list of type specifications

See Also

filetype(5) - description of specification format
strings(1) - tool for examining non-textfiles
od(1) - tool for examining non-textfiles


This program is inspired by the public domain version of file(1) , by Ian Darwin of SoftQuad, Canada, which is in turn inspired by the System V and older UNIX version of the file(1) commands.