Skip to main content

Documentation Index

Fetch the complete documentation index at: https://base.bangwu.me/llms.txt

Use this file to discover all available pages before exploring further.

Rclone

Rclone is a command-line tool for managing cloud storage files. It provides a unified interface for many providers, including object storage, enterprise and consumer file services, and standard transfer protocols. It follows Unix-style conventions and works well with common shell tools such as rsync, cp, mv, mount, ls, ncdu, tree, rm, and cat. It is especially useful for tasks like synchronizing objects in a CDN workflow.

Installation

Official download page: https://rclone.org/downloads/ Follow the official installation guide. On Windows, adding Rclone to your PATH makes it much easier to use.

Basic commands

CommandDescription
rclone configAdd, remove, or manage remotes
rclone config fileShow the path to the config file
rclone config showDisplay the current config file contents
rclone [功能Option] <Configurationname:路径> <Configurationname:路径> [parameters] [parameters]

Common operations

CommandDescription
rclone copyCopy files
rclone moveMove files; add --delete-empty-src-dirs if you also want to remove empty source directories afterward
rclone syncSync the source directory to the target directory; only the target side is modified
rclone sizeShow the total size used by a remote path
rclone deleteDelete file contents under a path
rclone purgeDelete a path and everything inside it
rclone mkdirCreate a directory
rclone rmdirRemove a directory
rclone rmdirsRemove empty directories in the given path; with --leave-root, the root directory is preserved
rclone checkVerify whether source and target data match
rclone lsList all files with size and path
rclone lslSame as above, but also shows upload time
rclone lsdList directories
rclone lsfList both directories and files

Useful flags

CommandDescription
-n = –dry-runDry run mode; preview what Rclone would do
-P = –progressShow live transfer progress, refreshed every 500 ms instead of once per minute
–cache-chunk-size 5MChunk size; larger values usually upload faster but use more memory
–onedrive-chunk-size 100MIncrease OneDrive upload speed on high-bandwidth servers
–drive-chunk-size 64MIncrease Google Drive upload speed on high-bandwidth servers
–cache-chunk-total-size SizeSuffixTotal local disk space that chunks may use
–transfers=NNumber of parallel file transfers; default is 4
–config stringSpecify a custom config file path
–ignore-errorsContinue when errors occur
–size-onlyValidate only by file size, not by hash
–drive-server-side-across-configsUse server-side transfer across configs when supported

Logs

Rclone supports four log levels: ERROR, NOTICE, INFO, and DEBUG. By default, Rclone emits ERROR and NOTICE logs.
CommandDescription
-qOutput only ERROR messages
-vOutput ERROR, NOTICE, and INFO messages
-vvOutput ERROR, NOTICE, INFO, and DEBUG messages
–log-level LEVELSet the log level explicitly

Filtering

CommandDescription
–excludeExclude a file or directory
–includeInclude a file or directory
–filterUse filter rules; rules beginning with + include, and rules beginning with - exclude

Environment variables

Almost every rclone option can also be configured through environment variables. The variable name is derived from the long option name: remove the -- prefix, replace - with _, convert to uppercase, and add the RCLONE_ prefix. Environment variables have lower priority than command-line flags. For example, if you set RCLONE_MIN_SIZE=50 but run rclone with --min-size 100, the command-line value wins.

Common environment variables

CommandDescription
RCLONE_CONFIGCustom config file path
RCLONE_CONFIG_PASSPassword used to decrypt an encrypted config file
RCLONE_RETRIESNumber of retries after upload failure; default is 3
RCLONE_RETRIES_SLEEPDelay between retries; suffixes s, m, and h mean seconds, minutes, and hours
CLONE_TRANSFERSNumber of parallel uploads
RCLONE_CACHE_CHUNK_SIZEChunk size
RCLONE_CACHE_CHUNK_TOTAL_SIZETotal local space available for chunks
RCLONE_IGNORE_ERRORS=trueSkip errors
Last modified on April 19, 2026