Remove Directory Unix

Remove Directory Unix

If you want to remove directories and their contents recursively or remove file or remove directory you could use below:

  • Syntax:

rm [option]… [directory/File]…

  • Options help: To see what are all options are available for rm command please use below:

Examples:

  • rm -r JavaHonk – Remove directories name JavaHonk and their contents recursively
  • rm -f JavaHonk – Ignore nonexistent files never prompt and delete directory
  • rm test.txt – Delete file name test.txt
  • For more information on Unix command please visit Wikipedia

Leave a Reply

Your email address will not be published. Required fields are marked *