To create a directory in Linux, you will use the mkdir command with the name of the directory that your want to create.
To delete an empty directory, you can use the rmdir command with the path to the folder that you want to remove.
If the folder is not empty though, it will give you an error if you use the rmdir command. Instead, you will have to use the rm command to delete the folder and everything in it. So if you are totally sure you do not need anything in the folder, you can use this:
rm -rfv foldername
That command will remove everything in the folder, outputting what it’s doing as it’s doing it.
Chris March 25th, 2011
Posted In: General