- First make sure you are in your home directory. Then try to remove
the newdir directory. What happens?
cd ~ rmdir newdir
- Recursively list the contents of newdir. Notice that its subdirectories
are all empty. Remove all of the empty subdirectories within newdir and
then list newdir again to confirm that they were removed:
ls -R newdir rmdir newdir/* ls -R newdir
- Finally, remove the empty newdir directory: