Red Hat NETSCAPE MANAGEMENT SYSTEM 6.0 - CUSTOMIZATION User Manual Page 281

  • Download
  • Add to my manuals
  • Print
  • Page
    / 300
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 280
17.5 Copying, Moving and Renaming Files and Directories 269
[billy@localhost billy]$ rm -i piglet.txt
rm: remove ’piglet.txt’?
You can also delete les using the wildcard *, but be careful, because you can easily delete les you
didnt intend to throw away.
To remove a le using a wildcard, you would type:
rm pig*
You can also remove more than one le in one command, as in:
rm piglet.txt sneakers.txt
Options for removing les and directories include:
-i interactive. Prompts you to conrm the deletion. This is good.
-f force. Overrides interactive mode and removes the le(s) without prompting. This might
not be good, unless you know exactly what youre doing.
-v verbose. Shows a listing of les as theyre being removed.
-r recursive. When removing directories, will remove all of the les and the subdirectories
of the specied directory. This can also get rid of an empty directory.
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
And if you want to combine options, such as forcing a recursive deletion, you can type:
rm -rf tigger
Tip: Be careful! rm is a powerful command, and can delete your entire system! If youre
root and you type the simple command rm -rf / youre sunk like a snake eating its
tail, the command will recursively remove everything on your system.
The safer alternative to using rm for removing directories is the rmdir command. With this com-
mand, you wont be allowed to use recursive deletions, so a directory which has les in it wontbe
deleted.
Read the rmdir man page by typing man rmdir to nd out more about the command.
Page view 280
1 2 ... 276 277 278 279 280 281 282 283 284 285 286 ... 299 300

Comments to this Manuals

No comments