UTERMINAL
TERMINAL
NEXT
$V1$
PAUSE
PAGETURNER
ENCORE5
ENCORE
BOX
COMMAND
GO
file
SYNOPSIS
file [-m] [-f namesfile] filename
SYNOPSIS
file [-L] [-f filelist] filename
FUNCTION
Determines the type of the file, i.e. ASCII,
executable, object, nroff, text, etc. If the
file is an ASCII file, file examines the first
512 bytes and tries to guess its language.
OPTIONS
-f - examines all of the files listed in filelist
-L - if a file is a link, test the file referenced by the link
OPTIONS
-f - examines all of the files listed in namesfile
-m - sets the access time for the examined file to the
current time
Let us assume that there is a file called
counter, with the above text:
counter
counter(n) /* count 1 bits in n */
unsigned n;
{
int b;
for (b = 0; n != 0; n >>= 1)
if ( n & 01)
b++;
return(b);
}
Let us use the file command
to determine the type of the file counter:
Please type: file counter
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type file counter
Please type file counter
I guess I must type this for you:
$PROMPT$
FORGET1
Observe the result on the terminal!
file counter
counter: c program text
$PROMPT$