mkdir is a core linux command-line utility that is used to create a directory. There are a few ways you can make use of the linux tool mkdir
How to use mkdir
# syntax, options = optionalmkdir<OPTIONS><DIRECTORYNAME>##### create directory, with parameters and withoutmkdirtest# create a directory named testmkdir-ptest/test1241/testing/hamburgers# creates the directory structure test/test1241/testing/hamburgersmkdir/root/testdir# creates the directory testdir in the root directorymkdir-m700# create a directory where only the owner has the permissions to move, rename or delete the directorymkdirtest1test2test3# create 3 directories in the current directory you're in. These are named test1, test2, test3
rmdir is the opposite of mkdir, rmdir is used to delete empty directories.
(checkout rm if you want to delete directories with content, you can't achieve this with rmdir)
How to use rmdir
# syntax, options = optionalrmdir<OPTIONS><DIRECTORY>rmdirtest# removes the directory testrmdir-ptest/test1241/testing/hamburgers# remove the directory structure test/test1241/testing/hamburgersrmdirtesttest1test2test3# removes the 4 directories : test test1 test2 and test3rmdir/root/testdir# removes the directory testdir from the root directory