A list of useful commands for the rclone command line tool.
Full documentation: https://rclone.org
Installation using the official script: See https://rclone.org/install/.
Installation on mac using brew:
brew install rclone
rclone config
Standard steps: create a new remote, skip client_id and client_secret, leave option tenant empty, advanced config: no, use web browser to authenticate automatically.
Check if rclone can see remote files:
rclone lsd remote_name:
<source> and <destination> are the names of the remotes. If the folder is local, leave out this label.
rclone copy \
"<source>:<path/to/source>" \
"<destination>:<path/to/destination>" \
--progress \
--dry-run
rclone copy \
"<source>:<path/to/source>" \
"<destination>:<path/to/destination>" \
--progress \
--transfers 4 \
--checkers 8
Settings: 4 transfers for parallel downloading (useful for larger files); 8 checkers for fast directory scanning.
For large files, you can make rclone more stubborn (defaults are 3 and 10):
--retries 5 --low-level-retries 20
Optional. May take a while.
rclone check \
"<source>:<path/to/source>" \
"<destination>:<path/to/destination>"
This makes a copy and deletes the original on the remote.
rclone move \
"<source>:<path/to/source>" \
"<destination>:<path/to/destination>" \
--progress
rclone delete \
"<source>:<path/to/source>" \
--dry-run
rclone delete \
"<source>:<path/to/source>" \
--progress
Remove all empty child dirs and root dir (if empty):
rclone rmdirs \
"<source>:<path/to/source>"