Here is the video version, if you prefer it:
The rmdir
command is used to remove empty directories. (Barrett, 2016) Its usage is as follows:
rmdir emptyDir1
or (for deleting multiple empty directories):
rmdir emptyDir1 emptyDir2 …
Note that rmdir
only removes empty directories. To remove directories that contain files, use rm -r,
but please do remember to use it with extreme caution!
Thank you for reading and hope you learned something useful!
References
Barrett, D. J. (2016). Linux pocket guide (3rd ed.). O’Reilly Media. Page 55