Examples of removing directories

Examples of removing directories

To remove an empty directory:

   rmdir docs

This removes the empty directory docs from the current directory.


To remove a directory containing files and subdirectories:

   rm -r projectX

This deletes the directory projectX and any files or subdirectories that it holds.


To remove a directory interactively:

   rm -ir plan9

This will prompt you for confirmation before removing each subdirectory, any files and the directory plan9 itself.


[Home] [Search] [Index] This site maintained by unixhelp@math.rutgers.edu
This page was last updated on September 05, 2006 at 10:30 am and is maintained by webmaster@math.rutgers.edu.
For questions regarding courses and/or special permission, please contact mclausen@math.rutgers.edu.
For questions or comments about this site, please contact help@math.rutgers.edu.
© 2012 Rutgers, The State University of New Jersey. All rights reserved.