Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Interoperating Between User Environments
Open System Services Porting Guide520573-006
4-25
Manipulating Guardian Files From the OSS Shell
Normally, when files are copied to /G, the file has the date and timestamp of when the
copy occurred. If the -Wclobber parameter is specified, cp sets the date and
timestamp to that of the from file.
The file Utility
You can use the OSS file utility to detect Guardian file types. File types in /G are
based on the Guardian file codes (types). The following command displays the
pathname of the file and the file type:
file /G/data01/stu01/teditpfl
The ls Utility
The OSS ls utility lists and generates statistics for files. You can use the -W parameter
and a /G filename to display a Guardian file type. No other ls flags can be specified
with the -W parameter; it is reserved for only Guardian files.
The following ls utility example is followed by its output:
ls -W /G/data01/stu01/report
/G/data01/stu01/report 101
The mv Utility
Use the OSS mv utility moves the location of files and directories and renames them.
You can use mv to rename filenames in /G only if the specified filenames reside within
the same volume.
The following is an example of using the mv utility within /G:
mv /G/data01/stu01/record /G/data01/stu01/record2
The pax Utility
With the pax utility, you can specify Guardian files for archiving by using the /G syntax.
Files with file types 0 and 180 are copied unmodified; files with file types 101 (EDIT
files) are converted to ASCII text files that are compatible with OSS; all other Guardian
files are ignored. Files restored in /G are given file type 0.
When files with OSS pathnames are restored into the Guardian file system, the
pathnames are converted and truncated (if necessary) into compatible Guardian
filenames.
To specify a tape drive, specify the -f parameter with a name in /G. In the following
example, /G/tape represents the Guardian process name $TAPE:
pax -f /G/tape
pax has implemented tape disposition flags: -W clobber, -W norewind,
-W unload, -W nounload, -W wait, and -W nowait (default). If -W wait is