29.06.2013 Views

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Notes<br />

Related Information<br />

Examples<br />

(expression)<br />

This evaluates to true if the parenthesized expression evaluates to true.<br />

!expression<br />

This is the unary NOT operator. It evaluates to true if the expression is<br />

false.<br />

expression -and expression<br />

The -and operator is the logical AND operator. As it is implied by the<br />

juxtaposition of two expressions it does not have to be specified. The<br />

expression evaluates to true if both expressions are true. The second<br />

expression is not evaluated if the first expression is false.<br />

expression -or expression<br />

The -or operator is the logical OR operator. The expression evaluates to<br />

true if either the first or the second expression is true. The second<br />

expression is not evaluated if the first expression is true.<br />

All operands and primaries must be separate arguments to the find utility. Primaries<br />

which themselves take arguments expect each argument to be a separate<br />

argument to find.<br />

1. The special characters used by find are also special characters to many shell<br />

programs. In particular, the characters *, [, ], ?, (, ), !, and ; may have to be<br />

escaped from the shell.<br />

v file - Determine file type<br />

v xargs - Construct argument lists and invoke utility<br />

1. Find all *.class files starting at the directory ”/project/java/class“.<br />

find /project/java/class -name '*.class'<br />

2. Find all the *.java files that have the ”import java.awt;“ string in them starting at<br />

the directory, ”/project/java/code“.<br />

find /project/java/code -name '*.java' -exec grep 'import java.awt;' {} \;<br />

3. Find all the files that belong to the user ”abbey“ starting at the directory,<br />

”/project“.<br />

find /project -user abbey<br />

[ Legal | AS/400 Glossary ]<br />

head - Copy the first part of files<br />

Synopsis<br />

56 <strong>Qshell</strong> <strong>Interpreter</strong> (<strong>qsh</strong>)<br />

head [-n count] [file ...]

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

Saved successfully!

Ooh no, something went wrong!