To delete a directory in a Unix-like operating system, you can use the following commands:
-
To delete an empty directory:
rmdir directory_name -
To delete a directory and all its contents (files and subdirectories):
rm -rf directory_name
Replace directory_name with the name of the directory you want to delete. Use the -rf option with caution, as it will permanently delete the directory and everything inside it without confirmation.
