Removing entire directory using SSH

This is how to recursively delete a specified directory, including all files and all sub directories.

rm -rf DirectoryToDelete

rm : remove
-rf : recursively delete a specified directory, including all files and all sub directories. (note the f makes it delete without asking confirmation)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>