Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

rm(1) OSS Shell and Utilities Reference Manual
equivalent of a y, rm deletes the le. If the response is anything else, the rm command does
nothing to that le and continues with the next specied le.
The -i ag causes rm to prompt and read the standard input even if the standard input is not a ter-
minal. In the absence of -i, however, the prompting is not done when the standard input is not a
terminal.
Environment Variables
The following environment variables affect the execution of the rm command:
LC_MESSAGES
Determines the locales equivalent of y or n (for yes/no queries).
UTILSGE Species that HP extensions to the root directory should be omitted when the ini-
tial directory is root and a recursive operation occurs in an OSS shell command.
Application programs that test this variable might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to the UTILSGE environment variable is the
same as specifying the -W NOG or -W NOE ag in the command.
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.
754 Hewlett-Packard Company 527188-004