16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

Options<br />

v If the variable _<strong>UNIX</strong>03=YES is set, a space is used to separate the file name<br />

and the type.<br />

v If the variable _<strong>UNIX</strong>03 is unset or is not set to YES, a tab is used to separate<br />

the file name and the file type.<br />

The file utility uses three types of tests to determine the file type: the file attribute<br />

tests, the position-sensitive tests and the context-sensitive tests.<br />

v The ″file attribute tests″ determine file types such as directory, character special,<br />

FIFO, socket, symbolic link, and external link.<br />

v The ″position-sensitive tests’’ determine file types by looking for certain string or<br />

binary values at specific offsets in the file being examined. The ″default<br />

position-sensitive tests″ are defined by:<br />

– The /etc/magic file<br />

– The AMODE test built into the file utility<br />

If a magic file test succeeds, the message field of the line will be printed and no<br />

further tests will be applied, except for tests on immediately following lines<br />

beginning with a single ’>’ character.<br />

v The ″default context-sensitive tests″ are built into the file utility. These tests look<br />

for language constructs in text files trying to identify shell scripts, C, FORTRAN,<br />

and other computer language source files, and even plain text files. The ″default<br />

context-sensitive tests″ will never be applied before any ″position-sensitive tests″<br />

even if the -d option is specified before an -m magic option or -M magic option.<br />

–c Only checks the file magic (specified by -m or -M) and /etc/magic (If the<br />

semantics imply it, see ″Usage Notes″) for validity of format.<br />

-d Apply any default position-sensitive tests and default context-sensitive tests<br />

to the file. This is the default if no -M or -m option is specified. See ″Usage<br />

Notes″.<br />

-E Uses the magic file and bypasses the checking of regular files for<br />

executables.<br />

–f filelist<br />

Examines the files listed in the file filelist.<br />

-h When a symbolic link is encountered, identify file as a symbolic link instead<br />

of following the link.<br />

If -h is not specified and<br />

file is an external link or file is a symbolic link referring to a nonexistent<br />

file:<br />

If the variable _<strong>UNIX</strong>03=YES is set<br />

The type will be reported as if -h was specified.<br />

If the variable _<strong>UNIX</strong>03 is unset or is not set to YES<br />

The type will be reported as if -h was not specified.<br />

-i If file is a regular file, does not attempt to classify the type of the file further.<br />

This option can only be used with -h and -f options. See ″Usage Notes″ for<br />

the file types that file command does not attempt to classify.<br />

–M magic<br />

Uses the file magic to classify the file type. No default position-sensitive<br />

file<br />

Chapter 2. Shell command descriptions 277

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!