Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

cr4sync del(alias delete

删除 Cloudreve 远端文件或目录。

用法

cr4sync del cloudreve://my/x/y.zip        # 删单文件
cr4sync del -r cloudreve://my/old-dir      # 递归删目录 (必须 -r)
cr4sync delete -r -y /backup/2024          # 跳过确认提示

参数

参数类型默认说明
<target>string远端路径或 cloudreve:// URI。
-r, --recursiveflagfalse递归删除目录。目录必须带 -r,否则报错。
-y, --yesflagfalse跳过 y/N 确认提示,脚本场景用。

行为

  1. 单文件:POST /file/delete 直接删。
  2. 目录(带 -r):默认弹 y/N 确认提示(-y 跳过)→ 调 Cloudreve 递归删除接口。

路径 scheme

ls 类似,缺省 scheme 视为 cloudreve://my/...不支持 baidu:// 删除源端(tips:cr4sync 是迁移工具,不主动也不具备改源数据能力)。

错误退出

现象原因
remote: 404目标不存在
local: refused用户在确认提示输入 n
bad arg: directory without -r目标是目录但未指定 -r