rclone for Google Drive and Dropbox
rclone seamlessly connects to remote cloud storage for cloud storage services including Google Shared Drive, Dropbox, Microsoft OneDrive and many more providers. The rclone CLI is easier than rsync. rclone works with encrypted filesystems.
Setup Rclone:
- Linux: Download and extract–for PC, use
amd64
- macOS / Homebrew:
brew install rclone
- Windows:
winget install Rclone.Rclone
Add various remote file shares (Google Drive, Dropbox, etc.) by:
rclone config
In these examples, remote
is the particular drive name chosen during rclone config
.
Tell the location of the Rclone config file by:
rclone config file
Rclone command examples
List remote directories:
rclone lsd remote:
List remote directories under path/to
rclone lsd remote:path/to
List remote files under path/to
rclone ls remote:path/to
Count number of files in path/to
rclone ls remote:path/to | wc -l
copy in rclone by default does not clobber existing remote files, if they haven’t been changed.
Recursively copy local computer ~/path
to remote
rclone copy ~/path remote:path -v
Copy only this directory contents ~/path
to remote
rclone copy --max-depth 0 ~/path remote:path -v
Using rclone sync requires caution, because sync DELETES files on remote that are not also on local PC!
Sync local computer ~/path
to the remote
rclone sync ~/path remote:path -v
Dropbox
Why not use Dropbox’s unofficial dbxcli? At the time of writing, the last release was in 2019 with many unsolved issues.