rclone Cheatsheet - Cloud Sync
云存储管理必备的 rclone 命令都在这里了,支持 70+ 存储后端,按场景分类整理,同步备份直接复制。
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-rundry-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 限制传输带宽,避免占满网络。