What is the command to delete a directory that has files in it? ubuntu

rm -r directory
or
rm -rf directory
an explanation can easily be retrieved with man rm, here is an extract:
-r, -R, --recursive
          remove directories and their contents recursively
-f, --force
          ignore nonexistent files and arguments, never prompt 
also from man rmdir:
rmdir

Remove directory, this command will only work if the folders are empty.
 
use sudo before command if it displays permissions denied. 

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation