Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
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.
You cannot use the OSS Network File System (NFS) to access files 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 flags and the UTILSGE environment variable are HP extensions to
the XPG4 Version 2 specification.
527188-007 Hewlett-Packard Company 7−55