Small tip - How to erase a directory and all its contents in Linux
Follow @ggarronWhen you use rmdir without the -r option, and the directory is not empty, you will get this message
rmdir: failed to remove `tmp': Directory not emptyill get a
So if you want to delete a directory with all its contents, you may use two different commands.
rmdir -r directory
or
rm -rf directory
Use this with care, as its results can not be undone, and better if you never use it as root.