Latest web development tutorials

Linux rmdir Command

Linux command Daquan Linux command Daquan

Linux rmdir command to delete empty directories.

grammar

rmdir [-p] dirName

Parameters:

  • -p is the subdirectory is deleted when it has become an empty directory, then the way to be deleted.
  • Examples

    The working directory, subdirectory called AAA deleted:

    rmdir AAA

    In the BBB under the working directory, delete the subdirectory named Test. If the Test after deleting, BBB directories become empty directory, the BBB also be deleted.

    rmdir -p BBB/Test

    Linux command Daquan Linux command Daquan