1 Star 0 Fork 4.9K

fish / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rm.md 3.40 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

rm

Command Function

This command is used to delete a file or folder.

Syntax

rm [-r] [dirname / filename]

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

-r

Deletes a directory. This parameter is optional. It is required if a directory is to be deleted.

N/A

dirname/filename

Indicates the name of the file or directory to be deleted. The value can be a path.

N/A

Usage

  • The rm command deletes only one file or directory at a time.
  • The rm -r command can be used to delete a non-empty directory.

Example

Example:

  1. Enter rm log1.txt.
  2. Enter rm -r sd.

Output

Figure 1 Deleting the log1.txt file

Figure 2 Deleting the sd directory

1
https://gitee.com/fish_neil/docs.git
git@gitee.com:fish_neil/docs.git
fish_neil
docs
docs
master

搜索帮助