Advertisement
mouhsineelachbi

Linux Delete Directory With rmdir Command

May 22nd, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Linux Delete Directory With rmdir Command :
  2. - rmdir command syntax
  3. mdir [OPTION] {directory-name}
  4.  
  5. - Delete / remove directory
  6. To delete directory called foo, enter:
  7. rmdir foo
  8.  
  9. - Remove DIRECTORY and its ancestors
  10. For example remove directory structure sales/99/march
  11. rmdir -p sales/99/march
  12.  
  13. - Recursive delete
  14. Remove all directories and subdirectories, use rm command with -r option:
  15. rm -rf /home/data/2000
  16.  
  17. - Please note that rmdir command works with all Linux and Unix like operating systems. For more information read rm and rmdir command man pages:
  18. man rm
  19. man rmdir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement