Knowledge Base > Automation Engine and Target Systems > UNIX > PREP_PROCESS - Querying the UNIX Filesystem.

PREP_PROCESS - Querying the UNIX File System

AE supplies the utility UCXE???F which can be used to query the UNIX file system. The question marks are placeholders for the UNIX system's system ID and version number.

Using this utility extends the query options compared to the usual OS command "ls". To obtain information about the UNIX file system, you must specify the parameters of the script statement PREP_PROCESS in a specific syntax.


In one of this script function's parameters, you can specify the file name including the path. This parameter starts with the keyword PATH. To specify the file name, you can use the wildcards "*" and "?". "*" represents any number of characters, "?" represents exactly one. The current directory is used if neither path nor file name are specified. Relative path indications are not yet supported.

A different parameter starts with the keyword FSPAR. It stores the specifications for querying the file system. These specifications consist of a keyword and a value. Several additional specifications must be separated with a blank. Enclose a value in double quotation marks if it includes a blank (for example, ATIME="980101 1000").

Keyword

Value/Description

PATH (or: PFAD) This is the parameter keyword for the file-name specification, including its full path description.
FSPAR This is the parameter keyword for the file-system query.
TYPE

The specification of a file type:

- for a regular file
D for a directory file
L for a symbolic reference (not applicable in POSIX.1 or SVR4)
B for a block-oriented device file
C for a character-oriented device file
P for a Pipe or a FIFO
S for a Socket (not applicable in POSIX.1 or SVR4)

Default value: all file types.

SIZE The selection criteria for the file size.
OWNER The name of the owner of the files (User), not the User ID.
GROUP The name of the owners of the file (Group), not the Group ID.
ATIME The time of the last access.
MTIME The time of the last modification of the file system.
STIME The time of the change of the file status.
MODE When you specify "RECURSIVE", the subordinate directories will also be checked.

Comments

SIZE can only be specified for regular files. If SIZE has been defined, the TYPE definition is internally set to a regular file. The file size is specified in bytes.

The following date and time formats can be used to specify ATIME, MTIME and STIME. The following abbreviations are used: "Y" for the year, "M" for the month and "D" for the day. If no time is specified, AE uses the value "0000".

Examples

All home-directory files with the ID AE which were last accessed between 6 October 1997, 12:00 and 31 December 1998, 23:50 and which have a file size between 1 and 9999 bytes are listed. All subdirectories of the home directory are considered.

:SET &HND = PREP_PROCESS('SOLARIS','UNIXFS','*','UC_LOGIN=AE','PATH=./*', 'FSPAR=ATIME="19971006 1200","19981231 2350" SIZE=1,9999 MODE=RECURSIVE')

 

See also:

Querying the UNIX File System

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function