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.

file is command and filename expanded and then tested to see if it has the<br />

specified relationship to the real user. If file does not exist or is inaccessible or, for<br />

the operators indicated by *, if the specified file type does not exist on the current<br />

system, then all inquiries return false (0).<br />

These operators may be combined for conciseness: –xy file is equivalent to –x file<br />

&& –y file. For example, –fx is true (returns 1) for plain executable files, but not for<br />

directories.<br />

L may be used in a multiple-operator test to apply subsequent operators to a<br />

symbolic link instead of to the file to which the link points. For example, -lLo is true<br />

for links owned by the invoking user. Lr, Lw, and Lx are always ture for links and<br />

false for non-links. L has a different meaning when it is the last operator in a<br />

multiple-operator test.<br />

It is possible but not useful, and sometimes misleading, to combine operators which<br />

expect file to be a file with operators which do not (for example, X and t). Following<br />

L with a non-file operator can lead to particularly strange results.<br />

Other operators return other information, that is not just 0 or 1. They have the same<br />

format as before where op may be one of:<br />

A Last file access time, as the number of seconds since epoch<br />

A: Like A, but in timestamp format, that is, ’Fri May 14 16:36:10 1993’<br />

M Last file modification time<br />

M: Like M, but in timestamp format<br />

C Last inode modification time<br />

C: Like C, but in timestamp format<br />

D Device number<br />

I Inode number<br />

F Composite file identifier, in the form device : inode<br />

L The name of the file pointed to by a symbolic link<br />

N Number of (hard) links<br />

P Permissions, in octal, without leading zero<br />

P: Like P, with leading zero<br />

P mode<br />

Equivalent to -P mode & file, that is, -P22 file returns 22 if file is writable by<br />

group and other, 20 if by group only, and 0 if by neither.<br />

P mode:<br />

Like P mode, with leading zero<br />

U Numeric userid<br />

U: Username, or the numeric userid if the username is unknown<br />

G Numeric groupid<br />

G: Groupname, or the numeric groupid if the groupname is unknown<br />

Z Size in bytes<br />

m file returns the seclabel of the file if one exists. Otherwise, returns false.<br />

tcsh<br />

Chapter 2. Shell command descriptions 649

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

Saved successfully!

Ooh no, something went wrong!