rclone Cheatsheet - Cloud Sync

云存储管理必备的 rclone 命令都在这里了,支持 70+ 存储后端,按场景分类整理,同步备份直接复制。

SysOps·35 commands·Last updated 2026-07-21
Back to SysOps

配置与连接 6

rclone config
交互式配置远程存储
rclone config show
查看所有远程配置
rclone listremotes
列出已配置的远程名称
rclone config show remote:
查看指定远程的配置
rclone config create remote: s3
非交互式创建远程配置
rclone config delete remote:
删除指定远程配置

浏览与列表 5

rclone lsd remote:
列出远程根目录下的目录
rclone ls remote:path
递归列出远程所有文件
rclone lsl remote:path
列出文件含大小和修改时间
rclone tree remote:path
树形结构展示远程目录
rclone size remote:bucket
统计远程目录总大小和文件数

同步与复制 6

rclone sync /local remote:bucket
同步本地到远程(单向,会删除目标多余文件)
rclone copy /local remote:bucket
复制文件到远程(不删除目标文件)
rclone move /local remote:bucket
移动文件到远程(传输后删除源文件)
rclone sync remote:bucket /local --dry-run
dry-run 预览同步操作
rclone bisync /local remote:bucket
双向同步两个目录
rclone copyto src.txt remote:dst.txt
复制单个文件并重命名

过滤与规则 6

rclone sync /local remote:bucket --include "*.txt"
只同步 txt 文件
rclone sync /local remote:bucket --exclude "*.log"
排除 log 文件
rclone sync /local remote:bucket --exclude-from rules.txt
从文件读取排除规则
rclone sync /local remote:bucket --filter-from filter.txt
从文件读取过滤规则(含包含和排除)
rclone sync /local remote:bucket --max-size 10M
只同步小于 10M 的文件
rclone sync /local remote:bucket --ignore-size
忽略大小,只比较时间

挂载与服务 6

rclone mount remote:bucket /mnt/cloud --vfs-cache-mode full
挂载远程为本地目录,启用完整缓存
rclone mount remote:bucket /mnt/cloud --daemon
后台守护进程方式挂载
rclone serve http remote:bucket --addr :8080
通过 HTTP 服务远程文件
rclone serve sftp remote:bucket --addr :2022
通过 SFTP 服务远程文件
rclone serve webdav remote:bucket --addr :8080
通过 WebDAV 服务远程文件
rclone rcd --rc
启动远程控制 API 服务

加密与校验 6

rclone crypt create remote:encrypted remote:plain
创建加密远程配置
rclone crypt check remote:encrypted remote:plain
校验加密远程一致性
rclone check /local remote:bucket
校验源和目标文件是否一致
rclone dedupe remote:bucket
查找并处理重复文件
rclone hashsum md5 remote:bucket
计算远程文件 MD5 哈希
rclone cleanup remote:bucket
清理远程存储的残留文件

💡 Tips

  • sync 是单向同步,会删除目标端多余文件;copy 只复制不删除,更安全。
  • mount 需要 fuse 支持,macOS 用 macFUSE,Linux 用 fuse3,建议加 --vfs-cache-mode full。
  • rclone 支持断点续传,大文件传输中断后重新运行即可继续。
  • --progress 参数可以显示实时传输进度和速度,--verbose 显示详细日志。
  • --transfers N 控制并发文件数,--transfers 4 表示同时传输 4 个文件。
  • --bwlimit 1M 限制传输带宽,避免占满网络。