1# rmdir 2 3 4## Command Function 5 6This command is used to delete a directory. 7 8 9## Syntax 10 11rmdir [_-p_] [_dirname..._] 12 13 14## Parameters 15 16**Table 1** Parameter description 17 18| Parameter| Description| Value Range| 19| -------- | -------- | -------- | 20| --help | Displays the parameters supported by the **rmdir** command.| N/A | 21| -p | Deletes a path.| N/A | 22| --ignore-fail-on-non-empty | Suppresses the error message when a non-empty directory is to be deleted.| N/A | 23| dir | Specifies the name of the directory to delete. The directory must be empty. A path is supported.| N/A | 24 25 26## Usage Guidelines 27 28- The **rmdir** command can only be used to delete directories. 29 30- The **rmdir** command can delete only one directory at a time. 31 32- The **rmdir** command can delete only empty directories. 33 34 35## Example 36 37Run **rmdir dir**. 38 39 40## Output 41 42Delete the directory **dir**. 43 44 45``` 46OHOS:/test$ mkdir dir 47OHOS:/test$ ls 48dir 49OHOS:/test$ rmdir dir/ 50OHOS:/test$ ls 51``` 52