Random Linux

Linux, video games and web hosting

To create a directory in Linux, you will use the mkdir command with the name of the directory that your want to create.

mkdir foldername

To delete an empty directory, you can use the rmdir command with the path to the folder that you want to remove.

rmdir foldername

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.

March 25th, 2011

Posted In: General

Leave a Reply

Your email address will not be published. Required fields are marked *