home *** CD-ROM | disk | FTP | other *** search
- NAME
- rm - remove files or directories
-
- VERSION
- 1.20 January 1988
-
- SYNOPSIS
- rm [-?] [-fri[-]] <files>
-
- DESCIRPTION
- Rm removes files or directories. Protected ('read-only') files are
- not deleted without permission except under the no complaints mode
- (see option -f).Options can be stacked and can turned off and on for
- selective portions of the command line using the turn on/off feature
-
- An evironment variable lookup is available. Set the environment
- variable "RMOPT" from DOS to your favourite settings.The DOS command:
- set RMOPT=arguments
- will set the environment string to the arguments, which are exactly
- like those by the command itself (including filenames). First the
- environment options are evaluated, filenames given there are deleted
- and then the usual command string is parsed. A typical use would be
- to put the following command in the autoexec.bat file
-
- set RMOPT=-i
-
- A generic option line would look like:
-
- rm options files option- files option2- files option files
-
- The options apply to files following the options and can be turned
- off by using '-' after the option (see examples).
-
- -? Give a short usage note. Same as the command without any
- options.
-
- -f[-] Delete files without complaints. This means that files are
- deleted even if they are 'read-only'. This does not over-ride
- the 'do not delete directories' feature (I did it this way
- to keep on the safe side). '-f' turns the option on and '-f-'
- turns the option off.
-
- -r[-] Delete directories recursively. If a directory is encountered
- it is deleted and all its contents (including subdirectories)
- are deleted. '-r' turns the option on and '-r-' turns the
- option off. Non-empty directories are not deleted and a
- warning is given (unless the '-f' switch was on, of course!).
-
- -i[-] Delete interactively. Queries before deleting every file.
- '-i' turns the option on and '-i-' turns the option off.
-
- -[-] Use the next argument as a filename. This is to allow use
- of file names which begin with a '-'. '-' turns the option
- on and '--' turns the option off (can't think of any use of
- '--' since it is a noop!).
-
- <files> Names of files to be deleted. Wild cards are allowed. For
- names begining with '-' see option '-'. Directories are
- not deleted unless '-r' option is specified.
-
- EXAMPLES
- All examples assume that RMOPT is not set to anything.
-
- rm a *.opt
- will delete the file "a" and all files "*.opt". Directories and
- read-only files will not be deleted.
-
- rm -r dirname
- will delete "dirname" even if it is a directory.
-
- rm -fr a
- will delete "a" whether it is a directory or a read only file.
-
- rm -r dirs1 -r-f dirs2
- will delete "dirs1" even if it is a directory but will not delete
- "dirs2" if it is a directory. The option '-r-f' is read as follows
- '-' + 'r-' + 'f' => option symbol + don't delete directories
- + do everything quietly
- rm - -r
- will delete a file "-r". Note here because of the '-' option "-r"
- is used as a filename rather than as an option.
-
- NOTES
- The option on/off feature is not available in Unix(tm).
- The environment option is not available in Unix(tm).
- This version fixes a bug in v1.00 :
- When a nonexistent single file was asked to be deleted
- the program correctly found there was no file but then
- tried to delete the file as if it were read-only.
- This version fixes a bug in v1.10 :
- When a multiple directory deletion was attempted the
- entire disk was wiped out.
-
- BUGS
- Notify all bugs to Q3696@PUCC.BITNET or
- {seismo, rutgers}\!princeton\!phoenix\!asjoshi.
-
- ACKNOWLEDGEMENTS
- The program was written using Turbo C v1.0 (patch 9). The manual
- page for 'rm' for the Silicon Graphics Iris 3020(tm) was used as the
- guideline. The program and this manual page are completly written
- by me.
- Thanks to Forrest Gehrke for pointing out the bug in v1.00.
- Thanks to Dan Jones for pointing out the bug in v1.10
-