Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ file(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ld(1)

magic(4)




file(1) file(1)
NAME file - determines the type of a file SYNOPSIS file [-c] [-f ffile] [-m mfile] arg... ARGUMENTS arg Specifies the argument that will be tested by the file command. -c Causes file to check the magic file for format errors. This validation is not normally carried out for reasons of efficiency. No file typing is done under the -c option. -f ffile Specifies the file containing the names of the files to be examined. -m mfile Instructs file to use an alternate magic file. DESCRIPTION file performs a series of tests on each file named in its arguments in an attempt to classify it. If the file appears to be ASCII, file examines the first 512 bytes and tries to guess its language. If a file is an executable a.out file, file will print the version stamp, provided it is greater than 0 (see ld(1)). The file command uses the file /etc/magic to identify files that have some sort of ``magic number,'' that is, any file containing a numeric or string constant that indicates its type. Commentary at the beginning of /etc/magic explains its format. EXAMPLES The command: file text-file program-file directory reports the filenames and directory name, and whether the files are English text, nroff input, a C program, or whatever. FILES /bin/file Executable file /etc/magic Executable file January 1992 1



file(1) file(1)
SEE ALSO ld(1) magic(4) in A/UX Programmer's Reference 2 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026