Deleting folders and files from a directory
7,704
This command will remove directory and sub-directories
rm -r directory_name
This command will remove forcely
rm -rf directory_name
This command will remove the empty directory
rmdir directory_name
Related videos on Youtube
Author by
user160717
Updated on September 18, 2022Comments
-
user160717 over 1 year
How do you delete all folders and files in a directory and subdirectory?
-
Radu Rădeanu almost 11 years
-f
option is not necessary. -
Qwintus almost 11 yearsOk I just looked that up, you're right. Thanks for the correction.