harmony 鸿蒙rmdir

  • 2022-08-09
  • 浏览 (617)

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

harmony 鸿蒙Kernel Coding Specification

harmony 鸿蒙Standard Libraries

harmony 鸿蒙Interrupt Management

harmony 鸿蒙Event

harmony 鸿蒙Mutex

harmony 鸿蒙Queue

harmony 鸿蒙Semaphore

harmony 鸿蒙Doubly Linked List

harmony 鸿蒙Memory Management

0  赞