Nick Craig-WoodVersion v1.44f96ce568 years agoHistory
12227 lines · 620.5 KB · HTML
RawDownload
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  <meta http-equiv="Content-Style-Type" content="text/css" />  <meta name="generator" content="pandoc" />  <meta name="author" content="Nick Craig-Wood" />  <title>rclone(1) User Manual</title>  <style type="text/css">code{white-space: pre;}</style></head><body><div id="header"><h1 class="title">rclone(1) User Manual</h1><h2 class="author">Nick Craig-Wood</h2><h3 class="date">Oct 15, 2018</h3></div><h1 id="rclone">Rclone</h1><p><a href="https://rclone.org/"><img src="https://rclone.org/img/rclone-120x120.png" alt="Logo" /></a></p><p>Rclone is a command line program to sync files and directories to and from:</p><ul><li>Amazon Drive (<a href="/amazonclouddrive/#status">See note</a>)</li><li>Amazon S3</li><li>Backblaze B2</li><li>Box</li><li>Ceph</li><li>DigitalOcean Spaces</li><li>Dreamhost</li><li>Dropbox</li><li>FTP</li><li>Google Cloud Storage</li><li>Google Drive</li><li>HTTP</li><li>Hubic</li><li>Jottacloud</li><li>IBM COS S3</li><li>Memset Memstore</li><li>Mega</li><li>Microsoft Azure Blob Storage</li><li>Microsoft OneDrive</li><li>Minio</li><li>Nextcloud</li><li>OVH</li><li>OpenDrive</li><li>Openstack Swift</li><li>Oracle Cloud Storage</li><li>ownCloud</li><li>pCloud</li><li>put.io</li><li>QingStor</li><li>Rackspace Cloud Files</li><li>SFTP</li><li>Wasabi</li><li>WebDAV</li><li>Yandex Disk</li><li>The local filesystem</li></ul><p>Features</p><ul><li>MD5/SHA1 hashes checked at all times for file integrity</li><li>Timestamps preserved on files</li><li>Partial syncs supported on a whole file basis</li><li><a href="https://rclone.org/commands/rclone_copy/">Copy</a> mode to just copy new/changed files</li><li><a href="https://rclone.org/commands/rclone_sync/">Sync</a> (one way) mode to make a directory identical</li><li><a href="https://rclone.org/commands/rclone_check/">Check</a> mode to check for file hash equality</li><li>Can sync to and from network, eg two different cloud accounts</li><li>(<a href="https://rclone.org/crypt/">Encryption</a>) backend</li><li>(<a href="https://rclone.org/cache/">Cache</a>) backend</li><li>(<a href="https://rclone.org/union/">Union</a>) backend</li><li>Optional FUSE mount (<a href="https://rclone.org/commands/rclone_mount/">rclone mount</a>)</li></ul><p>Links</p><ul><li><a href="https://rclone.org/">Home page</a></li><li><a href="https://github.com/ncw/rclone">GitHub project page for source and bug tracker</a></li><li><a href="https://forum.rclone.org">Rclone Forum</a></li><li><a href="https://google.com/+RcloneOrg" rel="publisher">Google+ page</a></li><li><a href="https://rclone.org/downloads/">Downloads</a></li></ul><h1 id="install">Install</h1><p>Rclone is a Go program and comes as a single binary file.</p><h2 id="quickstart">Quickstart</h2><ul><li><a href="https://rclone.org/downloads/">Download</a> the relevant binary.</li><li>Extract the <code>rclone</code> or <code>rclone.exe</code> binary from the archive</li><li>Run <code>rclone config</code> to setup. See <a href="https://rclone.org/docs/">rclone config docs</a> for more details.</li></ul><p>See below for some expanded Linux / macOS instructions.</p><p>See the <a href="https://rclone.org/docs/">Usage section</a> of the docs for how to use rclone, or run <code>rclone -h</code>.</p><h2 id="script-installation">Script installation</h2><p>To install rclone on Linux/macOS/BSD systems, run:</p><pre><code>curl https://rclone.org/install.sh | sudo bash</code></pre><p>For beta installation, run:</p><pre><code>curl https://rclone.org/install.sh | sudo bash -s beta</code></pre><p>Note that this script checks the version of rclone installed first and won't re-download if not needed.</p><h2 id="linux-installation-from-precompiled-binary">Linux installation from precompiled binary</h2><p>Fetch and unpack</p><pre><code>curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zipunzip rclone-current-linux-amd64.zipcd rclone-*-linux-amd64</code></pre><p>Copy binary file</p><pre><code>sudo cp rclone /usr/bin/sudo chown root:root /usr/bin/rclonesudo chmod 755 /usr/bin/rclone</code></pre><p>Install manpage</p><pre><code>sudo mkdir -p /usr/local/share/man/man1sudo cp rclone.1 /usr/local/share/man/man1/sudo mandb </code></pre><p>Run <code>rclone config</code> to setup. See <a href="https://rclone.org/docs/">rclone config docs</a> for more details.</p><pre><code>rclone config</code></pre><h2 id="macos-installation-from-precompiled-binary">macOS installation from precompiled binary</h2><p>Download the latest version of rclone.</p><pre><code>cd &amp;&amp; curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip</code></pre><p>Unzip the download and cd to the extracted folder.</p><pre><code>unzip -a rclone-current-osx-amd64.zip &amp;&amp; cd rclone-*-osx-amd64</code></pre><p>Move rclone to your $PATH. You will be prompted for your password.</p><pre><code>sudo mkdir -p /usr/local/binsudo mv rclone /usr/local/bin/</code></pre><p>(the <code>mkdir</code> command is safe to run, even if the directory already exists).</p><p>Remove the leftover files.</p><pre><code>cd .. &amp;&amp; rm -rf rclone-*-osx-amd64 rclone-current-osx-amd64.zip</code></pre><p>Run <code>rclone config</code> to setup. See <a href="https://rclone.org/docs/">rclone config docs</a> for more details.</p><pre><code>rclone config</code></pre><h2 id="install-from-source">Install from source</h2><p>Make sure you have at least <a href="https://golang.org/">Go</a> 1.7 installed. <a href="https://golang.org/dl/">Download go</a> if necessary. The latest release is recommended. Then</p><pre><code>git clone https://github.com/ncw/rclone.gitcd rclonego build./rclone version</code></pre><p>You can also build and install rclone in the <a href="https://github.com/golang/go/wiki/GOPATH">GOPATH</a> (which defaults to <code>~/go</code>) with:</p><pre><code>go get -u -v github.com/ncw/rclone</code></pre><p>and this will build the binary in <code>$GOPATH/bin</code> (<code>~/go/bin/rclone</code> by default) after downloading the source to <code>$GOPATH/src/github.com/ncw/rclone</code> (<code>~/go/src/github.com/ncw/rclone</code> by default).</p><h2 id="installation-with-ansible">Installation with Ansible</h2><p>This can be done with <a href="https://github.com/stefangweichinger/ansible-rclone">Stefan Weichinger's ansible role</a>.</p><p>Instructions</p><ol style="list-style-type: decimal"><li><code>git clone https://github.com/stefangweichinger/ansible-rclone.git</code> into your local roles-directory</li><li>add the role to the hosts you want rclone installed to:</li></ol><pre><code>    - hosts: rclone-hosts      roles:          - rclone</code></pre><h2 id="configure">Configure</h2><p>First, you'll need to configure rclone. As the object storage systems have quite complicated authentication these are kept in a config file. (See the <code>--config</code> entry for how to find the config file and choose its location.)</p><p>The easiest way to make the config is to run rclone with the config option:</p><pre><code>rclone config</code></pre><p>See the following for detailed instructions for</p><ul><li><a href="https://rclone.org/alias/">Alias</a></li><li><a href="https://rclone.org/amazonclouddrive/">Amazon Drive</a></li><li><a href="https://rclone.org/s3/">Amazon S3</a></li><li><a href="https://rclone.org/b2/">Backblaze B2</a></li><li><a href="https://rclone.org/box/">Box</a></li><li><a href="https://rclone.org/cache/">Cache</a></li><li><a href="https://rclone.org/crypt/">Crypt</a> - to encrypt other remotes</li><li><a href="/s3/#digitalocean-spaces">DigitalOcean Spaces</a></li><li><a href="https://rclone.org/dropbox/">Dropbox</a></li><li><a href="https://rclone.org/ftp/">FTP</a></li><li><a href="https://rclone.org/googlecloudstorage/">Google Cloud Storage</a></li><li><a href="https://rclone.org/drive/">Google Drive</a></li><li><a href="https://rclone.org/http/">HTTP</a></li><li><a href="https://rclone.org/hubic/">Hubic</a></li><li><a href="https://rclone.org/jottacloud/">Jottacloud</a></li><li><a href="https://rclone.org/mega/">Mega</a></li><li><a href="https://rclone.org/azureblob/">Microsoft Azure Blob Storage</a></li><li><a href="https://rclone.org/onedrive/">Microsoft OneDrive</a></li><li><a href="https://rclone.org/swift/">Openstack Swift / Rackspace Cloudfiles / Memset Memstore</a></li><li><a href="https://rclone.org/opendrive/">OpenDrive</a></li><li><a href="https://rclone.org/pcloud/">Pcloud</a></li><li><a href="https://rclone.org/qingstor/">QingStor</a></li><li><a href="https://rclone.org/sftp/">SFTP</a></li><li><a href="https://rclone.org/union/">Union</a></li><li><a href="https://rclone.org/webdav/">WebDAV</a></li><li><a href="https://rclone.org/yandex/">Yandex Disk</a></li><li><a href="https://rclone.org/local/">The local filesystem</a></li></ul><h2 id="usage">Usage</h2><p>Rclone syncs a directory tree from one storage system to another.</p><p>Its syntax is like this</p><pre><code>Syntax: [options] subcommand &lt;parameters&gt; &lt;parameters...&gt;</code></pre><p>Source and destination paths are specified by the name you gave the storage system in the config file then the sub path, eg &quot;drive:myfolder&quot; to look at &quot;myfolder&quot; in Google drive.</p><p>You can define as many storage paths as you like in the config file.</p><h2 id="subcommands">Subcommands</h2><p>rclone uses a system of subcommands. For example</p><pre><code>rclone ls remote:path # lists a rerclone copy /local/path remote:path # copies /local/path to the remoterclone sync /local/path remote:path # syncs /local/path to the remote</code></pre><h2 id="rclone-config">rclone config</h2><p>Enter an interactive configuration session.</p><h3 id="synopsis">Synopsis</h3><p>Enter an interactive configuration session where you can setup new remotes and manage existing ones. You may also set or remove a password to protect your configuration.</p><pre><code>rclone config [flags]</code></pre><h3 id="options">Options</h3><pre><code>  -h, --help   help for config</code></pre><h2 id="rclone-copy">rclone copy</h2><p>Copy files from source to dest, skipping already copied</p><h3 id="synopsis-1">Synopsis</h3><p>Copy the source to the destination. Doesn't transfer unchanged files, testing by size and modification time or MD5SUM. Doesn't delete files from the destination.</p><p>Note that it is always the contents of the directory that is synced, not the directory so when source:path is a directory, it's the contents of source:path that are copied, not the directory name and contents.</p><p>If dest:path doesn't exist, it is created and the source:path contents go there.</p><p>For example</p><pre><code>rclone copy source:sourcepath dest:destpath</code></pre><p>Let's say there are two files in sourcepath</p><pre><code>sourcepath/one.txtsourcepath/two.txt</code></pre><p>This copies them to</p><pre><code>destpath/one.txtdestpath/two.txt</code></pre><p>Not to</p><pre><code>destpath/sourcepath/one.txtdestpath/sourcepath/two.txt</code></pre><p>If you are familiar with <code>rsync</code>, rclone always works as if you had written a trailing / - meaning &quot;copy the contents of this directory&quot;. This applies to all commands and whether you are talking about the source or destination.</p><pre><code>rclone copy source:path dest:path [flags]</code></pre><h3 id="options-1">Options</h3><pre><code>  -h, --help   help for copy</code></pre><h2 id="rclone-sync">rclone sync</h2><p>Make source and dest identical, modifying destination only.</p><h3 id="synopsis-2">Synopsis</h3><p>Sync the source to the destination, changing the destination only. Doesn't transfer unchanged files, testing by size and modification time or MD5SUM. Destination is updated to match source, including deleting files if necessary.</p><p><strong>Important</strong>: Since this can cause data loss, test first with the <code>--dry-run</code> flag to see exactly what would be copied and deleted.</p><p>Note that files in the destination won't be deleted if there were any errors at any point.</p><p>It is always the contents of the directory that is synced, not the directory so when source:path is a directory, it's the contents of source:path that are copied, not the directory name and contents. See extended explanation in the <code>copy</code> command above if unsure.</p><p>If dest:path doesn't exist, it is created and the source:path contents go there.</p><pre><code>rclone sync source:path dest:path [flags]</code></pre><h3 id="options-2">Options</h3><pre><code>  -h, --help   help for sync</code></pre><h2 id="rclone-move">rclone move</h2><p>Move files from source to dest.</p><h3 id="synopsis-3">Synopsis</h3><p>Moves the contents of the source directory to the destination directory. Rclone will error if the source and destination overlap and the remote does not support a server side directory move operation.</p><p>If no filters are in use and if possible this will server side move <code>source:path</code> into <code>dest:path</code>. After this <code>source:path</code> will no longer longer exist.</p><p>Otherwise for each file in <code>source:path</code> selected by the filters (if any) this will move it into <code>dest:path</code>. If possible a server side move will be used, otherwise it will copy it (server side if possible) into <code>dest:path</code> then delete the original (if no errors on copy) in <code>source:path</code>.</p><p>If you want to delete empty source directories after move, use the --delete-empty-src-dirs flag.</p><p><strong>Important</strong>: Since this can cause data loss, test first with the --dry-run flag.</p><pre><code>rclone move source:path dest:path [flags]</code></pre><h3 id="options-3">Options</h3><pre><code>      --delete-empty-src-dirs   Delete empty source dirs after move  -h, --help                    help for move</code></pre><h2 id="rclone-delete">rclone delete</h2><p>Remove the contents of path.</p><h3 id="synopsis-4">Synopsis</h3><p>Remove the contents of path. Unlike <code>purge</code> it obeys include/exclude filters so can be used to selectively delete files.</p><p>Eg delete all files bigger than 100MBytes</p><p>Check what would be deleted first (use either)</p><pre><code>rclone --min-size 100M lsl remote:pathrclone --dry-run --min-size 100M delete remote:path</code></pre><p>Then delete</p><pre><code>rclone --min-size 100M delete remote:path</code></pre><p>That reads &quot;delete everything with a minimum size of 100 MB&quot;, hence delete all files bigger than 100MBytes.</p><pre><code>rclone delete remote:path [flags]</code></pre><h3 id="options-4">Options</h3><pre><code>  -h, --help   help for delete</code></pre><h2 id="rclone-purge">rclone purge</h2><p>Remove the path and all of its contents.</p><h3 id="synopsis-5">Synopsis</h3><p>Remove the path and all of its contents. Note that this does not obey include/exclude filters - everything will be removed. Use <code>delete</code> if you want to selectively delete files.</p><pre><code>rclone purge remote:path [flags]</code></pre><h3 id="options-5">Options</h3><pre><code>  -h, --help   help for purge</code></pre><h2 id="rclone-mkdir">rclone mkdir</h2><p>Make the path if it doesn't already exist.</p><h3 id="synopsis-6">Synopsis</h3><p>Make the path if it doesn't already exist.</p><pre><code>rclone mkdir remote:path [flags]</code></pre><h3 id="options-6">Options</h3><pre><code>  -h, --help   help for mkdir</code></pre><h2 id="rclone-rmdir">rclone rmdir</h2><p>Remove the path if empty.</p><h3 id="synopsis-7">Synopsis</h3><p>Remove the path. Note that you can't remove a path with objects in it, use purge for that.</p><pre><code>rclone rmdir remote:path [flags]</code></pre><h3 id="options-7">Options</h3><pre><code>  -h, --help   help for rmdir</code></pre><h2 id="rclone-check">rclone check</h2><p>Checks the files in the source and destination match.</p><h3 id="synopsis-8">Synopsis</h3><p>Checks the files in the source and destination match. It compares sizes and hashes (MD5 or SHA1) and logs a report of files which don't match. It doesn't alter the source or destination.</p><p>If you supply the --size-only flag, it will only compare the sizes not the hashes as well. Use this for a quick check.</p><p>If you supply the --download flag, it will download the data from both remotes and check them against each other on the fly. This can be useful for remotes that don't support hashes or if you really want to check all the data.</p><p>If you supply the --one-way flag, it will only check that files in source match the files in destination, not the other way around. Meaning extra files in destination that are not in the source will not trigger an error.</p><pre><code>rclone check source:path dest:path [flags]</code></pre><h3 id="options-8">Options</h3><pre><code>      --download   Check by downloading rather than with hash.  -h, --help       help for check      --one-way    Check one way only, source files must exist on remote</code></pre><h2 id="rclone-ls">rclone ls</h2><p>List the objects in the path with size and path.</p><h3 id="synopsis-9">Synopsis</h3><p>Lists the objects in the source path to standard output in a human readable format with size and path. Recurses by default.</p><p>Eg</p><pre><code>$ rclone ls swift:bucket    60295 bevajer5jef    90613 canole    94467 diwogej7    37600 fubuwic</code></pre><p>Any of the filtering options can be applied to this commmand.</p><p>There are several related list commands</p><ul><li><code>ls</code> to list size and path of objects only</li><li><code>lsl</code> to list modification time, size and path of objects only</li><li><code>lsd</code> to list directories only</li><li><code>lsf</code> to list objects and directories in easy to parse format</li><li><code>lsjson</code> to list objects and directories in JSON format</li></ul><p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be human readable. <code>lsf</code> is designed to be human and machine readable. <code>lsjson</code> is designed to be machine readable.</p><p>Note that <code>ls</code> and <code>lsl</code> recurse by default - use &quot;--max-depth 1&quot; to stop the recursion.</p><p>The other list commands <code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by default - use &quot;-R&quot; to make them recurse.</p><p>Listing a non existent directory will produce an error except for remotes which can't have empty directories (eg s3, swift, gcs, etc - the bucket based remotes).</p><pre><code>rclone ls remote:path [flags]</code></pre><h3 id="options-9">Options</h3><pre><code>  -h, --help   help for ls</code></pre><h2 id="rclone-lsd">rclone lsd</h2><p>List all directories/containers/buckets in the path.</p><h3 id="synopsis-10">Synopsis</h3><p>Lists the directories in the source path to standard output. Does not recurse by default. Use the -R flag to recurse.</p><p>This command lists the total size of the directory (if known, -1 if not), the modification time (if known, the current time if not), the number of objects in the directory (if known, -1 if not) and the name of the directory, Eg</p><pre><code>$ rclone lsd swift:      494000 2018-04-26 08:43:20     10000 10000files          65 2018-04-26 08:43:20         1 1File</code></pre><p>Or</p><pre><code>$ rclone lsd drive:test          -1 2016-10-17 17:41:53        -1 1000files          -1 2017-01-03 14:40:54        -1 2500files          -1 2017-07-08 14:39:28        -1 4000files</code></pre><p>If you just want the directory names use &quot;rclone lsf --dirs-only&quot;.</p><p>Any of the filtering options can be applied to this commmand.</p><p>There are several related list commands</p><ul><li><code>ls</code> to list size and path of objects only</li><li><code>lsl</code> to list modification time, size and path of objects only</li><li><code>lsd</code> to list directories only</li><li><code>lsf</code> to list objects and directories in easy to parse format</li><li><code>lsjson</code> to list objects and directories in JSON format</li></ul><p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be human readable. <code>lsf</code> is designed to be human and machine readable. <code>lsjson</code> is designed to be machine readable.</p><p>Note that <code>ls</code> and <code>lsl</code> recurse by default - use &quot;--max-depth 1&quot; to stop the recursion.</p><p>The other list commands <code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by default - use &quot;-R&quot; to make them recurse.</p><p>Listing a non existent directory will produce an error except for remotes which can't have empty directories (eg s3, swift, gcs, etc - the bucket based remotes).</p><pre><code>rclone lsd remote:path [flags]</code></pre><h3 id="options-10">Options</h3><pre><code>  -h, --help        help for lsd  -R, --recursive   Recurse into the listing.</code></pre><h2 id="rclone-lsl">rclone lsl</h2><p>List the objects in path with modification time, size and path.</p><h3 id="synopsis-11">Synopsis</h3><p>Lists the objects in the source path to standard output in a human readable format with modification time, size and path. Recurses by default.</p><p>Eg</p><pre><code>$ rclone lsl swift:bucket    60295 2016-06-25 18:55:41.062626927 bevajer5jef    90613 2016-06-25 18:55:43.302607074 canole    94467 2016-06-25 18:55:43.046609333 diwogej7    37600 2016-06-25 18:55:40.814629136 fubuwic</code></pre><p>Any of the filtering options can be applied to this commmand.</p><p>There are several related list commands</p><ul><li><code>ls</code> to list size and path of objects only</li><li><code>lsl</code> to list modification time, size and path of objects only</li><li><code>lsd</code> to list directories only</li><li><code>lsf</code> to list objects and directories in easy to parse format</li><li><code>lsjson</code> to list objects and directories in JSON format</li></ul><p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be human readable. <code>lsf</code> is designed to be human and machine readable. <code>lsjson</code> is designed to be machine readable.</p><p>Note that <code>ls</code> and <code>lsl</code> recurse by default - use &quot;--max-depth 1&quot; to stop the recursion.</p><p>The other list commands <code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by default - use &quot;-R&quot; to make them recurse.</p><p>Listing a non existent directory will produce an error except for remotes which can't have empty directories (eg s3, swift, gcs, etc - the bucket based remotes).</p><pre><code>rclone lsl remote:path [flags]</code></pre><h3 id="options-11">Options</h3><pre><code>  -h, --help   help for lsl</code></pre><h2 id="rclone-md5sum">rclone md5sum</h2><p>Produces an md5sum file for all the objects in the path.</p><h3 id="synopsis-12">Synopsis</h3><p>Produces an md5sum file for all the objects in the path. This is in the same format as the standard md5sum tool produces.</p><pre><code>rclone md5sum remote:path [flags]</code></pre><h3 id="options-12">Options</h3><pre><code>  -h, --help   help for md5sum</code></pre><h2 id="rclone-sha1sum">rclone sha1sum</h2><p>Produces an sha1sum file for all the objects in the path.</p><h3 id="synopsis-13">Synopsis</h3><p>Produces an sha1sum file for all the objects in the path. This is in the same format as the standard sha1sum tool produces.</p><pre><code>rclone sha1sum remote:path [flags]</code></pre><h3 id="options-13">Options</h3><pre><code>  -h, --help   help for sha1sum</code></pre><h2 id="rclone-size">rclone size</h2><p>Prints the total size and number of objects in remote:path.</p><h3 id="synopsis-14">Synopsis</h3><p>Prints the total size and number of objects in remote:path.</p><pre><code>rclone size remote:path [flags]</code></pre><h3 id="options-14">Options</h3><pre><code>  -h, --help   help for size      --json   format output as JSON</code></pre><h2 id="rclone-version">rclone version</h2><p>Show the version number.</p><h3 id="synopsis-15">Synopsis</h3><p>Show the version number, the go version and the architecture.</p><p>Eg</p><pre><code>$ rclone versionrclone v1.41- os/arch: linux/amd64- go version: go1.10</code></pre><p>If you supply the --check flag, then it will do an online check to compare your version with the latest release and the latest beta.</p><pre><code>$ rclone version --checkyours:  1.42.0.6latest: 1.42          (released 2018-06-16)beta:   1.42.0.5      (released 2018-06-17)</code></pre><p>Or</p><pre><code>$ rclone version --checkyours:  1.41latest: 1.42          (released 2018-06-16)  upgrade: https://downloads.rclone.org/v1.42beta:   1.42.0.5      (released 2018-06-17)  upgrade: https://beta.rclone.org/v1.42-005-g56e1e820</code></pre><pre><code>rclone version [flags]</code></pre><h3 id="options-15">Options</h3><pre><code>      --check   Check for new version.  -h, --help    help for version</code></pre><h2 id="rclone-cleanup">rclone cleanup</h2><p>Clean up the remote if possible</p><h3 id="synopsis-16">Synopsis</h3><p>Clean up the remote if possible. Empty the trash or delete old file versions. Not supported by all remotes.</p><pre><code>rclone cleanup remote:path [flags]</code></pre><h3 id="options-16">Options</h3><pre><code>  -h, --help   help for cleanup</code></pre><h2 id="rclone-dedupe">rclone dedupe</h2><p>Interactively find duplicate files and delete/rename them.</p><h3 id="synopsis-17">Synopsis</h3><p>By default <code>dedupe</code> interactively finds duplicate files and offers to delete all but one or rename them to be different. Only useful with Google Drive which can have duplicate file names.</p><p>In the first pass it will merge directories with the same name. It will do this iteratively until all the identical directories have been merged.</p><p>The <code>dedupe</code> command will delete all but one of any identical (same md5sum) files it finds without confirmation. This means that for most duplicated files the <code>dedupe</code> command will not be interactive. You can use <code>--dry-run</code> to see what would happen without doing anything.</p><p>Here is an example run.</p><p>Before - with duplicates</p><pre><code>$ rclone lsl drive:dupes  6048320 2016-03-05 16:23:16.798000000 one.txt  6048320 2016-03-05 16:23:11.775000000 one.txt   564374 2016-03-05 16:23:06.731000000 one.txt  6048320 2016-03-05 16:18:26.092000000 one.txt  6048320 2016-03-05 16:22:46.185000000 two.txt  1744073 2016-03-05 16:22:38.104000000 two.txt   564374 2016-03-05 16:22:52.118000000 two.txt</code></pre><p>Now the <code>dedupe</code> session</p><pre><code>$ rclone dedupe drive:dupes2016/03/05 16:24:37 Google drive root &#39;dupes&#39;: Looking for duplicates using interactive mode.one.txt: Found 4 duplicates - deleting identical copiesone.txt: Deleting 2/3 identical duplicates (md5sum &quot;1eedaa9fe86fd4b8632e2ac549403b36&quot;)one.txt: 2 duplicates remain  1:      6048320 bytes, 2016-03-05 16:23:16.798000000, md5sum 1eedaa9fe86fd4b8632e2ac549403b36  2:       564374 bytes, 2016-03-05 16:23:06.731000000, md5sum 7594e7dc9fc28f727c42ee3e0749de81s) Skip and do nothingk) Keep just one (choose which in next step)r) Rename all to be different (by changing file.jpg to file-1.jpg)s/k/r&gt; kEnter the number of the file to keep&gt; 1one.txt: Deleted 1 extra copiestwo.txt: Found 3 duplicates - deleting identical copiestwo.txt: 3 duplicates remain  1:       564374 bytes, 2016-03-05 16:22:52.118000000, md5sum 7594e7dc9fc28f727c42ee3e0749de81  2:      6048320 bytes, 2016-03-05 16:22:46.185000000, md5sum 1eedaa9fe86fd4b8632e2ac549403b36  3:      1744073 bytes, 2016-03-05 16:22:38.104000000, md5sum 851957f7fb6f0bc4ce76be966d336802s) Skip and do nothingk) Keep just one (choose which in next step)r) Rename all to be different (by changing file.jpg to file-1.jpg)s/k/r&gt; rtwo-1.txt: renamed from: two.txttwo-2.txt: renamed from: two.txttwo-3.txt: renamed from: two.txt</code></pre><p>The result being</p><pre><code>$ rclone lsl drive:dupes  6048320 2016-03-05 16:23:16.798000000 one.txt   564374 2016-03-05 16:22:52.118000000 two-1.txt  6048320 2016-03-05 16:22:46.185000000 two-2.txt  1744073 2016-03-05 16:22:38.104000000 two-3.txt</code></pre><p>Dedupe can be run non interactively using the <code>--dedupe-mode</code> flag or by using an extra parameter with the same value</p><ul><li><code>--dedupe-mode interactive</code> - interactive as above.</li><li><code>--dedupe-mode skip</code> - removes identical files then skips anything left.</li><li><code>--dedupe-mode first</code> - removes identical files then keeps the first one.</li><li><code>--dedupe-mode newest</code> - removes identical files then keeps the newest one.</li><li><code>--dedupe-mode oldest</code> - removes identical files then keeps the oldest one.</li><li><code>--dedupe-mode largest</code> - removes identical files then keeps the largest one.</li><li><code>--dedupe-mode rename</code> - removes identical files then renames the rest to be different.</li></ul><p>For example to rename all the identically named photos in your Google Photos directory, do</p><pre><code>rclone dedupe --dedupe-mode rename &quot;drive:Google Photos&quot;</code></pre><p>Or</p><pre><code>rclone dedupe rename &quot;drive:Google Photos&quot;</code></pre><pre><code>rclone dedupe [mode] remote:path [flags]</code></pre><h3 id="options-17">Options</h3><pre><code>      --dedupe-mode string   Dedupe mode interactive|skip|first|newest|oldest|rename. (default &quot;interactive&quot;)  -h, --help                 help for dedupe</code></pre><h2 id="rclone-about">rclone about</h2><p>Get quota information from the remote.</p><h3 id="synopsis-18">Synopsis</h3><p>Get quota information from the remote, like bytes used/free/quota and bytes used in the trash. Not supported by all remotes.</p><p>This will print to stdout something like this:</p><pre><code>Total:   17GUsed:    7.444GFree:    1.315GTrashed: 100.000MOther:   8.241G</code></pre><p>Where the fields are:</p><ul><li>Total: total size available.</li>

Lines 1–500 of 12227.