Wednesday, 15 April 2009

DELETE A DIRECTORY AND CONTENTS

rm -r < directory>

rm switches are as follows:

-r Recursive, removes all files in a directory, then the directory itself
-f Forced, ignores non-existant files and overrides any confirmation prompts
-i Interactive, prompts for confirmation of every deletion
-v Verbose

Be very careful with rm -rf, you can easily screw up your system.

0 comments: