Red Hat ENTERPRISE LINUX 3 - STEP BY STEP GUIDE Manual page 72

Table of Contents

Advertisement

58
rm: remove 'piglet.txt'?
You can also delete files using the wildcard
did not intend to throw away.
To remove a file using a wildcard, you would type:
rm pig*
The above command removes all files in the directory which start with the letters
You can also remove multiple files using the
rm piglet.txt sneakers.txt
You can use
rmdir
empty. To remove directories with
For example, if you want to recursively remove the directory
rm -r tigger/
If you want to combine options, such as forcing a recursive deletion, you can type:
rm -rf tigger/
A safer alternative to using
you are not allowed to use recursive deletions, so a directory which has files cannot be deleted.
Warning
The
command can delete your entire file system! If you are logged in as root and you type the
rm
simple command
system.
Read the
man page (
rmdir
to remove a directory (
, you must specify the
rm
for removing directories is the
rm
, you are in trouble; this command recursively removes everything on your
rm -rf /
) to find out more about this command.
man rmdir
Chapter 4. Managing Files and Directories
, but be careful, because you can easily delete files you
*
command. For example:
rm
, for example), but only if the directory is
rmdir foo
option.
-r
tigger/
rmdir
.
pig
you would type:
command. With this command,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents