Open System Services Management and Operations Guide (G06.30+, H06.08+, J06.03+)

Here are some examples of using the find command to locate and delete files:
Delete all files in /var/tmp whose names begin with TMP that have not been accessed in
thirty days:
find /var/tmp -name 'TMP*' -atime -30 | xargs rm
Delete all files that are named a.out or whose names end in .o that have not been accessed
in sixty days:
find / -W NOG -W NOE \( -name a.out -o -name '*.o' \) \
-atime -60 | xargs rm
Defragmenting Disks
OSS development environments might be similar to UNIX environments in that users can create a
large number of small files. Such files fragment your disks and slow down disk access considerably.
To restore optimum disk access speed, run the Guardian Disk Space Analysis Program/Disk
Compression Program (DSAP/DCOM) utility periodically to defragment the disks.
You can do this:
Automatically with either the OSS shell cron command or the optional Guardian NetBatch
product
While the OSS environment is running
Without stopping any filesets before you run DCOM
The syntax for the DCOM command to defragment a disk volume is:
DCOM volume
volume
is the name of the disk volume you want to defragment.
Compressing Files
You can compress files to create more space on a disk. You can use:
The pack utility, which is a POSIX.2 utility
The compress utility, which provides more compression than pack
Both utilities compress a file and store the specified file in a compressed form. The compressed
(packed) file replaces the input file and has a name derived from the original filename (filename.z
in the case of the pack utility, filename.Z in the case of the compress utility).
If you have the appropriate privileges, pack preserves the access modes, access and modification
dates, and owner of the original file. (For details about these attributes, see the chmod(1) reference
page either online or in the Open System Services Shell and Utilities Reference Manual.) Otherwise,
pack compresses the file and assigns your owner and group ID to the new file. The compress
utility always preserves access modes, access and modification dates, and owner information.
You can force compression of input files even if the files cannot benefit from compression. You can
also display statistics about the input files. Compression is not done under certain conditions; for
example, the file is already compressed, has hard links, is a directory, or cannot be opened. For
more information about the pack or compress command, see the pack(1) or compress(1)
reference page either online or in the Open System Services Shell and Utilities Reference Manual.
Beginning with the J06.14 and H06.25 RVUs, the Open Source gzip and bzip2 compression
tools are provided in the OSS Core Utilities product (T1202). For information about these tools,
see the corresponding reference page. (See “Viewing OSS Core Utilities Reference Pages (page 244)
for details of viewing these reference pages.)
242 Managing With the Shell