<!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">Jun 16, 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</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>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>Optional encryption (<a href="https://rclone.org/crypt/">Crypt</a>)</li><li>Optional cache (<a href="https://rclone.org/cache/">Cache</a>)</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>Unpack and the <code>rclone</code> binary.</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 && 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 && 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 .. && 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.6 installed. Make sure your <code>GOPATH</code> is set, then:</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>. If you have built rclone before then you will want to update its dependencies first with this</p><pre><code>go get -u -v github.com/ncw/rclone/...</code></pre><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/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/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 <parameters> <parameters...></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 "drive:myfolder" to look at "myfolder" 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 "copy the contents of this directory". 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 "delete everything with a minimum size of 100 MB", 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 "--max-depth 1" 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 "-R" 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 "rclone lsf --dirs-only".</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 "--max-depth 1" 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 "-R" 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 "--max-depth 1" 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 "-R" 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.</p><pre><code>rclone version [flags]</code></pre><h3 id="options-15">Options</h3><pre><code> -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 'dupes': Looking for duplicates using interactive mode.one.txt: Found 4 duplicates - deleting identical copiesone.txt: Deleting 2/3 identical duplicates (md5sum "1eedaa9fe86fd4b8632e2ac549403b36")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> kEnter the number of the file to keep> 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> 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 "drive:Google Photos"</code></pre><p>Or</p><pre><code>rclone dedupe rename "drive:Google Photos"</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 "interactive") -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><li>Used: total size used</li><li>Free: total amount this user could upload.</li><li>Trashed: total amount in the trash</li><li>Other: total amount in other storage (eg Gmail, Google Photos)</li><li>Objects: total number of objects in the storage</li></ul><p>Note that not all the backends provide all the fields - they will be missing if they are not known for that backend. Where it is known that the value is unlimited the value will also be omitted.</p><p>Use the --full flag to see the numbers written out in full, eg</p><pre><code>Total: 18253611008Used: 7993453766Free: 1411001220Trashed: 104857602Other: 8849156022</code></pre><p>Use the --json flag for a computer readable output, eg</p><pre><code>{ "total": 18253611008, "used": 7993453766, "trashed": 104857602, "other": 8849156022, "free": 1411001220}</code></pre><pre><code>rclone about remote: [flags]</code></pre><h3 id="options-18">Options</h3><pre><code> --full Full numbers instead of SI units -h, --help help for about --json Format output as JSON</code></pre>Lines 1–500 of 8213. Load more
<!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">Jun 16, 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</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>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>Optional encryption (<a href="https://rclone.org/crypt/">Crypt</a>)</li> <li>Optional cache (<a href="https://rclone.org/cache/">Cache</a>)</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>Unpack and the <code>rclone</code> binary.</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.zip unzip rclone-current-linux-amd64.zip cd rclone-*-linux-amd64</code></pre> <p>Copy binary file</p> <pre><code>sudo cp rclone /usr/bin/ sudo chown root:root /usr/bin/rclone sudo chmod 755 /usr/bin/rclone</code></pre> <p>Install manpage</p> <pre><code>sudo mkdir -p /usr/local/share/man/man1 sudo 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 && 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 && 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/bin sudo 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 .. && 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.6 installed. Make sure your <code>GOPATH</code> is set, then:</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>. If you have built rclone before then you will want to update its dependencies first with this</p> <pre><code>go get -u -v github.com/ncw/rclone/...</code></pre> <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/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/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 <parameters> <parameters...></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 "drive:myfolder" to look at "myfolder" 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 re rclone copy /local/path remote:path # copies /local/path to the remote rclone 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.txt sourcepath/two.txt</code></pre> <p>This copies them to</p> <pre><code>destpath/one.txt destpath/two.txt</code></pre> <p>Not to</p> <pre><code>destpath/sourcepath/one.txt destpath/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 "copy the contents of this directory". 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:path rclone --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 "delete everything with a minimum size of 100 MB", 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 "--max-depth 1" 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 "-R" 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 "rclone lsf --dirs-only".</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 "--max-depth 1" 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 "-R" 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 "--max-depth 1" 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 "-R" 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.</p> <pre><code>rclone version [flags]</code></pre> <h3 id="options-15">Options</h3> <pre><code> -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:dupes 2016/03/05 16:24:37 Google drive root 'dupes': Looking for duplicates using interactive mode. one.txt: Found 4 duplicates - deleting identical copies one.txt: Deleting 2/3 identical duplicates (md5sum "1eedaa9fe86fd4b8632e2ac549403b36") 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 7594e7dc9fc28f727c42ee3e0749de81 s) Skip and do nothing k) 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> k Enter the number of the file to keep> 1 one.txt: Deleted 1 extra copies two.txt: Found 3 duplicates - deleting identical copies two.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 851957f7fb6f0bc4ce76be966d336802 s) Skip and do nothing k) 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> r two-1.txt: renamed from: two.txt two-2.txt: renamed from: two.txt two-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 "drive:Google Photos"</code></pre> <p>Or</p> <pre><code>rclone dedupe rename "drive:Google Photos"</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 "interactive") -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: 17G Used: 7.444G Free: 1.315G Trashed: 100.000M Other: 8.241G</code></pre> <p>Where the fields are:</p> <ul> <li>Total: total size available.</li> <li>Used: total size used</li> <li>Free: total amount this user could upload.</li> <li>Trashed: total amount in the trash</li> <li>Other: total amount in other storage (eg Gmail, Google Photos)</li> <li>Objects: total number of objects in the storage</li> </ul> <p>Note that not all the backends provide all the fields - they will be missing if they are not known for that backend. Where it is known that the value is unlimited the value will also be omitted.</p> <p>Use the --full flag to see the numbers written out in full, eg</p> <pre><code>Total: 18253611008 Used: 7993453766 Free: 1411001220 Trashed: 104857602 Other: 8849156022</code></pre> <p>Use the --json flag for a computer readable output, eg</p> <pre><code>{ "total": 18253611008, "used": 7993453766, "trashed": 104857602, "other": 8849156022, "free": 1411001220 }</code></pre> <pre><code>rclone about remote: [flags]</code></pre> <h3 id="options-18">Options</h3> <pre><code> --full Full numbers instead of SI units -h, --help help for about --json Format output as JSON</code></pre>