harmony 鸿蒙rmdir
rmdir
Command Function
This command is used to delete a directory.
Syntax
rmdir [-p] [dirname…]
Parameters
Table 1 Parameter description
Parameter | Description | Value Range |
---|---|---|
–help | Displays the parameters supported by the rmdir command. | N/A |
-p | Deletes a path. | N/A |
–ignore-fail-on-non-empty | Suppresses the error message when a non-empty directory is to be deleted. | N/A |
dir | Specifies the name of the directory to delete. The directory must be empty. A path is supported. | N/A |
Usage Guidelines
The rmdir command can only be used to delete directories.
The rmdir command can delete only one directory at a time.
The rmdir command can delete only empty directories.
Example
Run rmdir dir.
Output
Delete the directory dir.
OHOS:/test$ mkdir dir
OHOS:/test$ ls
dir
OHOS:/test$ rmdir dir/
OHOS:/test$ ls
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Kernel Coding Specification
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦