To delete a subdirectory use rmdir (remove directory) e.g.:-
rmdir workremoves work directory below the current directory. The remove will fail if the directory is not empty. An alternative way to delete a directory is to use the delete command rm with the -r option e.g.:-
rm -r d1This deletes d1 together with its contents (including the entire subtree of directories it contains). This also is very powerful and must be used with EXTREME caution, it is better for the beginner not to use this command at all! A classic mistake with rm -r is to type:-
rm -r .*Remember that . is the current directory and .. is the current parent directory, so this commands deletes the entire contents of both!!!