This blog post provides a step-by-step guide on how to create and remove Directories in Linux using the mkdir and rmdir commands.
Creating and Removing Directories
- mkdir creates directories
- rmdir removes empty directories
- rm -r recursively removes directory tress
Directory Management
Directories are created with mkdir. For example, to create a directory called work:
amar@amar-pc:~/Desktop$ mkdir work
To remove an empty directory, use rmdir. For example:
amar@amar-pc:~/Desktop$ rmdir work
rmdir will only remove empty directories. To remove a directory and its contents, use rm -r.