Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

User Commands (p - r) rm(1)
EXAMPLES
1. To delete a file, enter:
rm myfile
If there is another link to this file, then the file remains under that name, but the file
myfile is removed. If myfile is the only link, the file itself is deleted.
2. To delete a file silently, enter:
rm -f core
This command removes file core without asking any questions or displaying any error
messages. This is normally used in shell procedures. It prevents confusing messages
from being displayed when deleting files that may or may not exist.
3. To delete files interactively, enter:
rm -i mydir/*
After each filename is displayed, enter the affirmative response; press <Return> (or any-
thing other than the affirmative response) to retain the file.
4. To delete a directory tree interactively, enter:
rm -ir manual
This recursively removes the contents of all subdirectories of the file manual, then
removes manual itself, asking if you want to remove each file and directory.
5. To delete all OSS files on the local node, enter:
export UTILSGE=NOG:NOE
rm -r /
6. To delete all OSS files on the remote node node1,enter:
rm -r -W NOG /E/node1
NOTES
Because /G and /E both appear in your local root directory, you should be very careful when
using OSS shell commands on or from the root directory. OSS shell commands that perform
recursive actions make no distinction between Guardian and OSS files or between local and
remote files. You can use the -W NOG and -W NOE flags or the UTILSGE environment vari-
able to exclude objects in the Guardian file system or objects accessible through the Expand pro-
duct.
For G-series RVUs, H06.19 and earlier H-series RVUs, or J06.08 and earlier J-series RVUs, the
OSS Network File System (NFS) you cannot use the rm command to remove OSS objects that
have OSS ACLs that contain optional ACL entries.
For H06.20 and later H-series RVUs and J06.09 and later J-series RVUs, access by the OSS Net-
work File System (NFS) to OSS objects that have OSS ACLs that contain optional ACL entries
can be allowed, depending upon the NFSPERMMAP attribute value for the fileset that contains
the object. For more information about NFS and ACLs, see the acl(5) reference page.
For H06.23 and later H-series RVUs, J06.12 and later J-series RVUs, the H06.22 RVU with the
T9194H01ˆAFA SPR installed, or the J06.11 RVU with the T9194J01ˆAEZ SPR installed, a
remote user can delete an SQL object that is in the OSS file system.
For H06.22 (without the T9194H01ˆAFA SPR installed) and earlier H-series RVUs, and J06.11
(without the T9194J01ˆAEZ SPR installed) and earlier J-series RVUs, if a remote user attempts
527188-021 Hewlett-Packard Company 755