RM [-q] file/directory [file/directory ...]
-q - Quiet mode will not prompt for user confirmation
file - File name (wildcards are permitted)
directory - Directory name (wildcards are permitted)
Note:
1. The root directory cannot be removed.
2. The current directory and upstream directories cannot be removed.
3. Read-only files and directories cannot be removed.
4. Directories containing read-only file(s) cannot be removed.
5. If an error occurs, RM will exit immediately.
6. RM will not prompt for user confirmation if the specified filename
contains wildcards.
7. Redirecting output to a file under a directory to be removed is not
allowed.
Examples:
* To remove multiple directories:
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)
* Error occurs and RM will exit:
fs0:\〉 rm test\temp11 temp2
rm/del: Cannot find 'fs0:\test\temp11' - Not Found
* To remove multiple directories with wildcards:
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]
* To remove a directory that contains a read-only file will fail:
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 write mode
- [error] - Access Denied
Exit status code: Access Denied
沒有留言:
張貼留言