Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (p - r) rm(1)
EXAMPLES
1. To delete a le, enter:
rm myle
If there is another link to this le, then the le remains under that name, but the le
myle is removed. If myle is the only link, the le itself is deleted.
2. To delete a le silently, enter:
rm -f core
This command removes le 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 les that may or may not exist.
3. To delete les interactively, enter:
rm -i mydir/*
After each lename is displayed, enter the afrmative response; press <Return> (or any-
thing other than the afrmative response) to retain the le.
4. To delete a directory tree interactively, enter:
rm -ir manual
This recursively removes the contents of all subdirectories of the le manual, then
removes manual itself, asking if you want to remove each le and directory.
5. To delete all OSS les on the local node, enter:
export UTILSGE=NOG:NOE
rm -r /
6. To delete all OSS les 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 les or between local and
remote les. You can use the -W NOG and -W NOE ags or the UTILSGE environment vari-
able to exclude objects in the Guardian le system or objects accessible through the Expand pro-
duct.
You cannot use the OSS Network File System (NFS) to access les that have optional ACL |
entries.
RELATED INFORMATION
Commands: ln(1), mv(1), rmdir(1).
Functions: rmdir(2), unlink(2).
Miscellaneous topics: acl(5).
STANDARDS CONFORMANCE
The -W NOG and -W NOE ags and the UTILSGE environment variable are HP extensions to
the XPG4 Version 2 specication.
527188-007 Hewlett-Packard Company 755