< Home

rmdir

Function

The rmdir command deletes a specified directory on the server.

Format

rmdir remote-directory &<1-10>

Parameters

Parameter Description Value

remote-directory1, remote-directory2…

Specifies the directory on the SFTP server.

The value is a string. The absolute path of the directory ranges from 1 to 64 characters without spaces.

Views

SFTP client view

Default Level

2: Configuration level

Usage Guidelines

You can delete up to a maximum of 10 directories at a time.

Before you use the rmdir command to delete a folder, ensure that the folder does not contain any files or the command will fail.

Example

# Delete folder directory 1 on the server.

<sysname> system-view
[sysname] sftp 10.1.1.1 
Please input the username:client001
Trying 10.1.1.1 ...
Press CTRL+K to abort
Enter password:   
sftp-client> rmdir directory1
Warning: Make sure to remove it? [Y/N]: y
Info: Succeeded in removing the directory directory1.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >