HP Unified Extensible Firmware Interface User Manual

Page 48

Advertising
background image

Options

-q

Deletes in quiet mode, without displaying a confirmation prompt.

file

Specifies the file name to be deleted. Wild cards are permitted.

directory

Specifies the directory to be deleted. Wild cards are permitted.

Description

This command deletes one or more files or directories. If the target is a directory, it deletes the
directory, including all its subdirectories. It is not allowed to redirect a file whose parent directory
(or the file itself) is being deleted.

Removing a read-only file or directory results in a failure. Removing a directory containing one or
more read-only files results in a failure. If an error occurs, rm exits immediately, and later files or
directories are not removed.

You cannot remove a directory when the current directory is itself or its subdirectory. If the file
specified for deletion contains wild cards, you are not prompted for confirmation.

You cannot remove the root directory. You cannot remove the current directory or its ancestor.

Examples

Attempting to remove multiple directories at one time when directories cannot be found (causing
the command to exit):

fs0:\> ls test
Directory of: fs0:\test

06/18/01 01:01p <DIR> 512 .
06/18/01 01:01p <DIR> 0 ..
06/19/01 12:59a <DIR> 512 temp1
06/19/01 12:59a <DIR> 512 temp2
0 File(s) 0 bytes
4 Dir(s)

fs0:\> rm test\temp11 temp2
rm/del: Cannot find 'fs0:\test\temp11' - Not Found

To remove multiple directories with wild cards:

fs0:\> rm test\temp*
rm/del: Remove subtree 'fs0:\test\temp1' [y/n]? y
removing fs0:\test\temp1\temp1.txt
- [ok]
removing fs0:\test\temp1\boot\nshell.efi
- [ok]
removing fs0:\test\temp1\boot
- [ok]
removing fs0:\test\temp1
- [ok]
rm/del: Remove subtree 'fs0:\test\temp2' [y/n]? y
removing fs0:\test\temp2\temp2.txt
- [ok]
removing fs0:\test\temp2
- [ok]

Attempting to remove a directory containing a read-only file, causing an error prompt:

fs0:\> attrib +r test\temp1\readme.txt
A R fs0:\test\temp1\readme.txt

fs0:\> rm test\temp1
rm/del: Cannot open 'readme.txt' under 'fs0:\test\temp1' in
writable mode
- [error] - Access Denied
Exit status code: Access Denied

48

UEFI Shell command reference

Advertising
This manual is related to the following products: