Red Hat LINUX 7.2 Manual page 136

Hide thumbs Also See for LINUX 7.2:
Table of Contents

Advertisement

136
-f — force. Overrides interactive mode and removes the file(s) without prompting. This might
not be a good idea, unless you know exactly what you are doing.
-v — verbose. Shows a list of files as they are being removed.
-r — recursive. Will delete a directory and all (if any) files and the subdirectories it contains.
You can use rmdir to remove a directory (rmdir foo, for example), but only if the directory is
empty. To remove directories with rm, you must specify the -r option.
For example, if you want to recursively remove the directory tigger you would type:
rm -r tigger
If you want to combine options, such as forcing a recursive deletion, you can type:
rm -rf tigger
The rm command can delete your entire filesystem! If you are logged in as
root and you type the simple command rm -rf /, you are in trouble; this
command will recursively remove everything on your system.
A safer alternative to using rm for removing directories is the rmdir command. With this command,
you will not be allowed to use recursive deletions, so a directory which has files in it will not be deleted.
Read the rmdir man page (man rmdir) to find out more about this command.
Chapter 11:Managing Files and Directories
CAUTION

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LINUX 7.2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Linux 7.2

Table of Contents