neulab/tldr huggingface dataset:
This an homage to the ncdu tool (https://dev.yorhel.nl/ncdu) but for rclone remotes.  It is missing lots of features at the moment but is useful as it stands.
Note that it might take some time to delete big files/folders.  The UI won't respond in the meantime since the deletion is done synchronously.
rclone ncdu remote:path [flags]
Options -h, --help   help for ncdu
rclone obscure Obscure password for use in the rclone config file.
Synopsis In the rclone config file, human readable passwords are obscured. Obscuring them is done by encrypting them and writing them out in base64. This is not a secure way of encrypting these passwords as rclone can decrypt them - it is to prevent "eyedropping" - namely someone seeing a password in the rclone config file by accident.
Many equally important things (like access tokens) are not obscured in the config file.  However it is very hard to shoulder surf a 64 character hex token.
This command can also accept a password through STDIN instead of an argument by passing a hyphen as an argument.  This will use the first line of STDIN as the password not including the trailing newline.
echo "secretpassword" | rclone obscure -
If there is no data on STDIN to read, rclone obscure will default to obfuscating the hyphen itself.
If you want to encrypt the config file then please use config file encryption - see rclone config (https://rclone.org/commands/rclone_config/) for more info.
rclone obscure password [flags]
Options -h, --help   help for obscure
rclone rc Run a command against a running rclone.
Synopsis This runs a command against a running rclone.  Use the --url flag to specify an non default URL to connect on.  This can be either a ":port" which is taken to mean "http://localhost:port" or a "host:port" which is taken to mean "http://host:port"
A username and password can be passed in with --user and --pass.
Note that --rc-addr, --rc-user, --rc-pass will be read also for --url, --user, --pass.
Arguments should be passed in as parameter=value.
The result will be returned as a JSON object by default.
The --json parameter can be used to pass in a JSON blob as an input instead of key=value arguments.  This is the only way of passing in more complicated values.
The -o/--opt option can be used to set a key "opt" with key, value options in the form "-o key=value" or "-o key".  It can be repeated as many times as required.  This is useful for rc commands which take the "opt" parameter which by convention is a dictionary of strings.
-o key=value -o key2
Will place this in the "opt" value
{"key":"value", "key2","")
The -a/--arg option can be used to set strings in the "arg" value.  It can be repeated as many times as required.  This is useful for rc commands which take the "arg" parameter which by convention is a list of strings.
-a value -a value2
Will place this in the "arg" value
["value", "value2"]
Use --loopback to connect to the rclone instance running "rclone rc". This is very useful for testing commands without having to run an rclone rc server, e.g.:
rclone rc --loopback operations/about fs=/
Use "rclone rc" to see a list of all possible commands.
rclone rc commands parameter [flags]
Options -a, --arg stringArray   Argument placed in the "arg" array -h, --help              help for rc --json string       Input JSON - use instead of key=value args --loopback          If set connect to this rclone instance not via HTTP --no-output         If set, don't output the JSON result -o, --opt stringArray   Option in the form name=value or name placed in the "opt" array --pass string       Password to use to connect to rclone remote control --url string        URL to connect to rclone remote control (default "http://localhost:5572/") --user string       Username to use to rclone remote control
rclone rcat Copies standard input to file on remote.
Synopsis rclone rcat reads from standard input (stdin) and copies it to a single remote file.
echo "hello world" | rclone rcat remote:path/to/file ffmpeg - | rclone rcat remote:path/to/file
If the remote file already exists, it will be overwritten.
rcat will try to upload small files in a single request, which is usually more efficient than the streaming/chunked upload endpoints, which use multiple requests.  Exact behaviour depends on the remote.  What is considered a small file may be set through --streaming-upload-cutoff. Uploading only starts after the cutoff is reached or if the file ends before that.  The data must fit into RAM.  The cutoff needs to be small enough to adhere the limits of your remote, please see there.  Generally speaking, setting this cutoff too high will decrease your performance.
Use the |--size| flag to preallocate the file in advance at the remote end and actually stream it, even if remote backend doesn't support streaming.
|--size| should be the exact size of the input stream in bytes.  If the size of the stream is different in length to the |--size| passed in then the transfer will likely fail.
Note that the upload can also not be retried because the data is not kept around until the upload succeeds.  If you need to transfer a lot of data, you're better off caching locally and then rclone move it to the destination.
rclone rcat remote:path [flags]
Options -h, --help       help for rcat --size int   File size hint to preallocate (default -1)
rclone rcd Run rclone listening to remote control commands only.
Synopsis This runs rclone so that it only listens to remote control commands.
This is useful if you are controlling rclone via the rc API.
If you pass in a path to a directory, rclone will serve that directory for GET requests on the URL passed in.  It will also open the URL in the browser when rclone is run.
See the rc documentation (https://rclone.org/rc/) for more info on the rc flags.
rclone rcd <path to files to serve>* [flags]
Options -h, --help   help for rcd
rclone rmdirs Remove empty directories under the path.
Synopsis This recursively removes any empty directories (including directories that only contain empty directories), that it finds under the path.  The root path itself will also be removed if it is empty, unless you supply the --leave-root flag.
Use command rmdir to delete just the empty directory given by path, not recurse.
This is useful for tidying up remotes that rclone has left a lot of empty directories in.  For example the delete command will delete files but leave the directory structure (unless used with option --rmdirs).
rclone rmdirs remote:path [flags]
Options -h, --help         help for rmdirs --leave-root   Do not remove root directory if empty
rclone selfupdate Update the rclone binary.
Synopsis This command downloads the latest release of rclone and replaces the currently running binary.  The download is verified with a hashsum and cryptographically signed signature.
If used without flags (or with implied --stable flag), this command will install the latest stable release.  However, some issues may be fixed (or features added) only in the latest beta release.  In such cases you should run the command with the --beta flag, i.e.  rclone selfupdate --beta.  You can check in advance what version would be installed by adding the --check flag, then repeat the command without it when you are satisfied.
Sometimes the rclone team may recommend you a concrete beta or stable rclone release to troubleshoot your issue or add a bleeding edge feature. The --version VER flag, if given, will update to the concrete version instead of the latest one.  If you omit micro version from VER (for example 1.53), the latest matching micro version will be used.
Upon successful update rclone will print a message that contains a previous version number.  You will need it if you later decide to revert your update for some reason.  Then you'll have to note the previous version and run the following command: rclone selfupdate [--beta] OLDVER. If the old version contains only dots and digits (for example v1.54.0) then it's a stable release so you won't need the --beta flag.  Beta releases have an additional information similar to v1.54.0-beta.5111.06f1c0c61.  (if you are a developer and use a locally built rclone, the version number will end with -DEV, you will have to rebuild it as it obviously can't be distributed).
If you previously installed rclone via a package manager, the package may include local documentation or configure services.  You may wish to update with the flag --package deb or --package rpm (whichever is correct for your OS) to update these too.  This command with the default --package zip will update only the rclone executable so the local manual may become inaccurate after it.
The rclone mount command (https://rclone.org/commands/rclone_mount/) may or may not support extended FUSE options depending on the build and OS. selfupdate will refuse to update if the capability would be discarded.
Note: Windows forbids deletion of a currently running executable so this command will rename the old executable to 'rclone.old.exe' upon success.
Please note that this command was not available before rclone version 1.55.  If it fails for you with the message unknown command "selfupdate" then you will need to update manually following the install instructions located at https://rclone.org/install/
rclone selfupdate [flags]
Options --beta             Install beta release --check            Check for latest release, do not download -h, --help             help for selfupdate --output string    Save the downloaded binary at a given path (default: replace running binary) --package string   Package format: zip|deb|rpm (default: zip) --stable           Install stable release (this is the default) --version string   Install the given rclone version (default: latest)
rclone serve Serve a remote over a protocol.
Synopsis rclone serve is used to serve a remote over a given protocol.  This command requires the use of a subcommand to specify the protocol, e.g.
rclone serve http remote:
Each subcommand has its own options which you can see in their help.
rclone serve <protocol> [opts] <remote> [flags]
Options -h, --help   help for serve
• rclone serve dlna (https://rclone.org/commands/rclone_serve_dlna/) - Serve remote:path over DLNA
• rclone serve docker (https://rclone.org/commands/rclone_serve_docker/) - Serve any remote on docker's volume plugin API.
• rclone serve ftp (https://rclone.org/commands/rclone_serve_ftp/) - Serve remote:path over FTP.
• rclone serve http (https://rclone.org/commands/rclone_serve_http/) - Serve the remote over HTTP.
• rclone serve restic (https://rclone.org/commands/rclone_serve_restic/) - Serve the remote for restic's REST API.
• rclone serve sftp (https://rclone.org/commands/rclone_serve_sftp/) - Serve the remote over SFTP.
• rclone serve webdav (https://rclone.org/commands/rclone_serve_webdav/) - Serve remote:path over webdav.
rclone serve dlna Serve remote:path over DLNA
Synopsis rclone serve dlna is a DLNA media server for media stored in an rclone remote.  Many devices, such as the Xbox and PlayStation, can automatically discover this server in the LAN and play audio/video from it.  VLC is also supported.  Service discovery uses UDP multicast packets (SSDP) and will thus only work on LANs.
Rclone will list all files present in the remote, without filtering based on media formats or file extensions.  Additionally, there is no media transcoding support.  This means that some players might show files that they are not able to play back correctly.
Server options Use --addr to specify which IP address and port the server should listen on, e.g.  --addr 1.2.3.4:8000 or --addr :8080 to listen to all IPs.
Use --name to choose the friendly server name, which is by default "rclone (hostname)".
Use --log-trace in conjunction with -vv to enable additional debug logging of all UPNP traffic.
rclone serve dlna remote:path [flags]
Options --addr string                            The ip:port or :port to bind the DLNA http server to (default ":7879") --dir-cache-time duration                Time to cache directory entries for (default 5m0s) --dir-perms FileMode                     Directory permissions (default 0777) --file-perms FileMode                    File permissions (default 0666) --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000) -h, --help                                   help for dlna --log-trace                              Enable trace logging of SOAP traffic --name string                            Name of DLNA server --no-checksum                            Don't compare checksums on up/download --no-modtime                             Don't read/write the modification time (can speed things up) --no-seek                                Don't allow seeking in files --poll-interval duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s) --read-only                              Mount read-only --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000) --umask int                              Override the permission bits set by the filesystem (not supported on Windows) (default 2) --vfs-cache-max-age duration             Max age of objects in the cache (default 1h0m0s) --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off) --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off) --vfs-cache-poll-interval duration       Interval to poll the cache for stale objects (default 1m0s) --vfs-case-insensitive                   If a file name not found, find a case insensitive match --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi) --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off) --vfs-read-wait duration                 Time to wait for in-sequence read before seeking (default 20ms) --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size --vfs-write-back duration                Time to writeback files after last use when using cache (default 5s) --vfs-write-wait duration                Time to wait for in-sequence write before giving error (default 1s)
SEE ALSO • rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a remote over a protocol.
rclone serve docker Serve any remote on docker's volume plugin API.
Synopsis This command implements the Docker volume plugin API allowing docker to use rclone as a data storage mechanism for various cloud providers. rclone provides docker volume plugin (/docker) based on it.
To create a docker plugin, one must create a Unix or TCP socket that Docker will look for when you use the plugin and then it listens for commands from docker daemon and runs the corresponding code when necessary.  Docker plugins can run as a managed plugin under control of the docker daemon or as an independent native service.  For testing, you can just run it directly from the command line, for example:
sudo rclone serve docker --base-dir /tmp/rclone-volumes --socket-addr localhost:8787 -vv
Running rclone serve docker will create the said socket, listening for commands from Docker to create the necessary Volumes.  Normally you need not give the --socket-addr flag.  The API will listen on the unix domain socket at /run/docker/plugins/rclone.sock.  In the example above rclone will create a TCP socket and a small file /etc/docker/plugins/rclone.spec containing the socket address.  We use sudo because both paths are writeable only by the root user.
If you later decide to change listening socket, the docker daemon must be restarted to reconnect to /run/docker/plugins/rclone.sock or parse new /etc/docker/plugins/rclone.spec.  Until you restart, any volume related docker commands will timeout trying to access the old socket.  Running directly is supported on Linux only, not on Windows or MacOS.  This is not a problem with managed plugin mode described in details in the full documentation (https://rclone.org/docker).
The command will create volume mounts under the path given by --base-dir (by default /var/lib/docker-volumes/rclone available only to root) and maintain the JSON formatted file docker-plugin.state in the rclone cache directory with book-keeping records of created and mounted volumes.
All mount and VFS options are submitted by the docker daemon via API, but you can also provide defaults on the command line as well as set path to the config file and cache directory or adjust logging verbosity.
rclone serve docker [flags]
rclone serve ftp Serve remote:path over FTP.
Synopsis rclone serve ftp implements a basic ftp server to serve the remote over FTP protocol.  This can be viewed with a ftp client or you can make a remote of type ftp to read and write it.
Server options Use --addr to specify which IP address and port the server should listen on, e.g.  --addr 1.2.3.4:8000 or --addr :8080 to listen to all IPs.  By default it only listens on localhost.  You can use port :0 to let the OS choose an available port.
If you set --addr to listen on a public or LAN accessible IP address then using Authentication is advised - see the next section for info.
Authentication By default this will serve files without needing a login.
You can set a single username and password with the --user and --pass flags.
Auth Proxy If you supply the parameter --auth-proxy /path/to/program then rclone will use that program to generate backends on the fly which then are used to authenticate incoming requests.  This uses a simple JSON based protocol with input on STDIN and output on STDOUT.
PLEASE NOTE: --auth-proxy and --authorized-keys cannot be used together, if --auth-proxy is set the authorized keys option will be ignored.
There is an example program bin/test_proxy.py (https://github.com/rclone/rclone/blob/master/test_proxy.py) in the rclone source code.
The program's job is to take a user and pass on the input and turn those into the config for a backend on STDOUT in JSON format.  This config will have any default parameters for the backend added, but it won't use configuration from environment variables or command line options - it is the job of the proxy program to make a complete config.
This config generated must have this extra parameter - _root - root to use for the backend
And it may have this parameter - _obscure - comma separated strings for parameters to obscure
If password authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
{ "user": "me", "pass": "mypassword" }
If public-key authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
{ "user": "me", "public_key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf" }
And as an example return this on STDOUT
{ "type": "sftp", "_root": "", "_obscure": "pass", "user": "me", "pass": "mypassword", "host": "sftp.example.com" }
This would mean that an SFTP backend would be created on the fly for the user and pass/public_key returned in the output to the host given.  Note that since _obscure is set to pass, rclone will obscure the pass parameter before creating the backend (which is required for sftp backends).
The program can manipulate the supplied user in any way, for example to make proxy to many different sftp backends, you could make the user be user@example.com and then set the host to example.com in the output and the user to user.  For security you'd probably want to restrict the host to a limited list.
Note that an internal cache is keyed on user so only use that for configuration, don't use pass or public_key.  This also means that if a user's password or public-key is changed the cache will need to expire (which takes 5 mins) before it takes effect.
This can be used to build general purpose proxies to any kind of backend that rclone supports.
rclone serve ftp remote:path [flags]
rclone serve http Serve the remote over HTTP.
Synopsis rclone serve http implements a basic web server to serve the remote over HTTP.  This can be viewed in a web browser or you can make a remote of type http read from it.
You can use the filter flags (e.g.  --include, --exclude) to control what is served.
The server will log errors.  Use -v to see access logs.
--bwlimit will be respected for file transfers.  Use --stats to control the stats printing.
Server options Use --addr to specify which IP address and port the server should listen on, eg --addr 1.2.3.4:8000 or --addr :8080 to listen to all IPs.  By default it only listens on localhost.  You can use port :0 to let the OS choose an available port.
--server-read-timeout and --server-write-timeout can be used to control the timeouts on the server.  Note that this is the total time for a transfer.
--max-header-bytes controls the maximum number of bytes the server will accept in the HTTP header.
--baseurl controls the URL prefix that rclone serves from.  By default rclone will serve from the root.  If you used --baseurl "/rclone" then rclone would serve from a URL starting with "/rclone/".  This is useful if you wish to proxy rclone serve.  Rclone automatically inserts leading and trailing "/" on --baseurl, so --baseurl "rclone", --baseurl "/rclone" and --baseurl "/rclone/" are all treated identically.
SSL/TLS By default this will serve over http.  If you want you can serve over https.  You will need to supply the --cert and --key flags.  If you wish to do client side certificate validation then you will need to supply --client-ca also.
--cert should be a either a PEM encoded certificate or a concatenation of that with the CA certificate.  --key should be the PEM encoded private key and --client-ca should be the PEM encoded client certificate authority certificate.  --template allows a user to specify a custom markup template for http and webdav serve functions.  The server exports the following markup to be used within the template to server pages:
Parameter                             Description ────────────────────────────────────────────────────────────────────────── .Name                                 The full path of a file/directory. .Title                                Directory listing of .Name .Sort                                 The current sort used.  This is changeable via ?sort= parameter Sort Options: namedirfirst,name,size,time (default namedirfirst) .Order                                The current ordering used.  This is changeable via ?order= parameter Order Options: asc,desc (default asc) .Query                                Currently unused. .Breadcrumb                           Allows for creating a relative navigation -- .Link                              The relative to the root link of the Text. -- .Text                              The Name of the directory. .Entries                              Information about a specific file/directory.
-- .URL                               The 'url' of an entry. -- .Leaf                              Currently same as 'URL' but intended to be 'just' the name. -- .IsDir                             Boolean for if an entry is a directory or not. -- .Size                              Size in Bytes of the entry. -- .ModTime                           The UTC timestamp of an entry.
You can either use an htpasswd file which can take lots of users, or set a single username and password with the --user and --pass flags.
Use --htpasswd /path/to/htpasswd to provide an htpasswd file.  This is in standard apache format and supports MD5, SHA1 and BCrypt for basic authentication.  Bcrypt is recommended.
To create an htpasswd file:
touch htpasswd htpasswd -B htpasswd user htpasswd -B htpasswd anotherUser
The password file can be updated while rclone is running.
Use --realm to set the authentication realm.
Use --salt to change the password hashing salt from the default.
rclone serve http remote:path [flags]
rclone serve restic Serve the remote for restic's REST API.
Synopsis rclone serve restic implements restic's REST backend API over HTTP.  This allows restic to use rclone as a data storage mechanism for cloud providers that restic does not support directly.
Restic (https://restic.net/) is a command line program for doing backups.
Setting up rclone for use by restic First set up a remote for your chosen cloud provider (https://rclone.org/docs/#configure).
Once you have set up the remote, check it is working with, for example "rclone lsd remote:".  You may have called the remote something other than "remote:" - just substitute whatever you called it in the following instructions.
Now start the rclone restic server
rclone serve restic -v remote:backup
Where you can replace "backup" in the above by whatever path in the remote you wish to use.
By default this will serve on "localhost:8080" you can change this with use of the "--addr" flag.
You might wish to start this server on boot.
Adding --cache-objects=false will cause rclone to stop caching objects returned from the List call.  Caching is normally desirable as it speeds up downloading objects, saves transactions and uses very little memory.
Setting up restic to use rclone Now you can follow the restic instructions (http://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#rest- server) on setting up restic.
Note that you will need restic 0.8.2 or later to interoperate with rclone.
For the example above you will want to use "http://localhost:8080/" as the URL for the REST server.
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/ $ export RESTIC_PASSWORD=yourpassword $ restic init created restic backend 8b1a4b56ae at rest:http://localhost:8080/
Please note that knowledge of your password is required to access the repository. Losing your password means that your data is irrecoverably lost. $ restic backup /path/to/files/to/backup scan [/path/to/files/to/backup] scanned 189 directories, 312 files in 0:00 [0:00] 100.00%  38.128 MiB / 38.128 MiB  501 / 501 items  0 errors  ETA 0:00 duration: 0:00 snapshot 45c8fdd8 saved
Multiple repositories Note that you can use the endpoint to host multiple repositories.  Do this by adding a directory name or path after the URL.  Note that these must end with /.  Eg
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user1repo/ # backup user1 stuff $ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/ # backup user2 stuff
Private repositories The "--private-repos" flag can be used to limit users to repositories starting with a path of /<username>/.
--template allows a user to specify a custom markup template for http and webdav serve functions.  The server exports the following markup to be used within the template to server pages:
Parameter                             Description ────────────────────────────────────────────────────────────────────────── .Name                                 The full path of a file/directory. .Title                                Directory listing of .Name .Sort                                 The current sort used.  This is changeable via ?sort= parameter
Sort Options: namedirfirst,name,size,time (default namedirfirst) .Order                                The current ordering used.  This is changeable via ?order= parameter Order Options: asc,desc (default asc) .Query                                Currently unused. .Breadcrumb                           Allows for creating a relative navigation -- .Link                              The relative to the root link of the Text. -- .Text                              The Name of the directory. .Entries                              Information about a specific file/directory. -- .URL                               The 'url' of an entry. -- .Leaf                              Currently same as 'URL' but intended to be 'just' the name. -- .IsDir                             Boolean for if an entry is a directory or not. -- .Size                              Size in Bytes of the entry. -- .ModTime                           The UTC timestamp of an entry.
--cert should be either a PEM encoded certificate or a concatenation of that with the CA certificate.  --key should be the PEM encoded private key and --client-ca should be the PEM encoded client certificate authority certificate.
rclone serve restic remote:path [flags]
Options --addr string                     IPaddress:Port or :Port to bind server to (default "localhost:8080") --append-only                     Disallow deletion of repository data --baseurl string                  Prefix for URLs - leave blank for root --cache-objects                   Cache listed objects (default true) --cert string                     SSL PEM key (concatenation of certificate and CA certificate) --client-ca string                Client certificate authority to verify clients with -h, --help                            help for restic --htpasswd string                 htpasswd file - if not provided no authentication is done --key string                      SSL PEM Private key --max-header-bytes int            Maximum size of request header (default 4096) --pass string                     Password for authentication --private-repos                   Users can only access their private repo --realm string                    realm for authentication (default "rclone") --server-read-timeout duration    Timeout for server reading data (default 1h0m0s) --server-write-timeout duration   Timeout for server writing data (default 1h0m0s) --stdio                           Run an HTTP2 server on stdin/stdout --template string                 User-specified template --user string                     User name for authentication
rclone serve sftp Serve the remote over SFTP.
Synopsis rclone serve sftp implements an SFTP server to serve the remote over SFTP.  This can be used with an SFTP client or you can make a remote of type sftp to use with it.
You must provide some means of authentication, either with --user/--pass, an authorized keys file (specify location with --authorized-keys - the default is the same as ssh), an --auth-proxy, or set the --no-auth flag for no authentication when logging in.
Note that this also implements a small number of shell commands so that it can provide md5sum/sha1sum/df information for the rclone sftp backend. This means that is can support SHA1SUMs, MD5SUMs and the about command when paired with the rclone sftp backend.
If you don't supply a host --key then rclone will generate rsa, ecdsa and ed25519 variants, and cache them for later use in rclone's cache directory (see "rclone help flags cache-dir") in the "serve-sftp" directory.
By default the server binds to localhost:2022 - if you want it to be reachable externally then supply "--addr :2022" for example.
Note that the default of "--vfs-cache-mode off" is fine for the rclone sftp backend, but it may not be with other SFTP clients.
If --stdio is specified, rclone will serve SFTP over stdio, which can be used with sshd via ~/.ssh/authorized_keys, for example:
restrict,command="rclone serve sftp --stdio ./photos" ssh-rsa ...
rclone serve sftp remote:path [flags]
Options --addr string                            IPaddress:Port or :Port to bind server to (default "localhost:2022") --auth-proxy string                      A program to use to create the backend from the auth --authorized-keys string                 Authorized keys file (default "~/.ssh/authorized_keys") --dir-cache-time duration                Time to cache directory entries for (default 5m0s) --dir-perms FileMode                     Directory permissions (default 0777) --file-perms FileMode                    File permissions (default 0666) --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000) -h, --help                                   help for sftp --key stringArray                        SSH private host key file (Can be multi-valued, leave blank to auto generate) --no-auth                                Allow connections with no authentication if set --no-checksum                            Don't compare checksums on up/download --no-modtime                             Don't read/write the modification time (can speed things up) --no-seek                                Don't allow seeking in files --pass string                            Password for authentication --poll-interval duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s) --read-only                              Mount read-only --stdio                                  Run an sftp server on run stdin/stdout --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000) --umask int                              Override the permission bits set by the filesystem (not supported on Windows) (default 2) --user string                            User name for authentication --vfs-cache-max-age duration             Max age of objects in the cache (default 1h0m0s) --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off) --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off) --vfs-cache-poll-interval duration       Interval to poll the cache for stale objects (default 1m0s) --vfs-case-insensitive                   If a file name not found, find a case insensitive match --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi) --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off) --vfs-read-wait duration                 Time to wait for in-sequence read before seeking (default 20ms) --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size --vfs-write-back duration                Time to writeback files after last use when using cache (default 5s) --vfs-write-wait duration                Time to wait for in-sequence write before giving error (default 1s)
rclone serve webdav Serve remote:path over webdav.
Synopsis rclone serve webdav implements a basic webdav server to serve the remote over HTTP via the webdav protocol.  This can be viewed with a webdav client, through a web browser, or you can make a remote of type webdav to read and write it.
Webdav options --etag-hash This controls the ETag header.  Without this flag the ETag will be based on the ModTime and Size of the object.
If this flag is set to "auto" then rclone will choose the first supported hash on the backend or you can use a named hash such as "MD5" or "SHA-1".
Use "rclone hashsum" to see the full list.
Parameter                             Description ────────────────────────────────────────────────────────────────────────── .Name                                 The full path of a file/directory. .Title                                Directory listing of .Name .Sort                                 The current sort used.  This is changeable via ?sort= parameter Sort Options: namedirfirst,name,size,time (default namedirfirst) .Order                                The current ordering used.  This is changeable via ?order= parameter Order Options: asc,desc (default asc) .Query                                Currently unused. .Breadcrumb                           Allows for creating a relative navigation -- .Link                              The relative to the root link of the Text. -- .Text                              The Name of the directory. .Entries                              Information about a specific file/directory. -- .URL                               The 'url' of an entry. -- .Leaf                              Currently same as 'URL' but intended to be 'just' the name. -- .IsDir                             Boolean for if an entry is a directory or not. -- .Size                              Size in Bytes of the entry. -- .ModTime                           The UTC timestamp of an entry.
rclone serve webdav remote:path [flags]
rclone settier Changes storage class/tier of objects in remote.
Synopsis rclone settier changes storage tier or class at remote if supported.  Few cloud storage services provides different storage classes on objects, for example AWS S3 and Glacier, Azure Blob storage - Hot, Cool and Archive, Google Cloud Storage, Regional Storage, Nearline, Coldline etc.
Note that, certain tier changes make objects not available to access immediately.  For example tiering to archive in azure blob storage makes objects in frozen state, user can restore by setting tier to Hot/Cool, similarly S3 to Glacier makes object inaccessible.true
You can use it to tier single object
rclone settier Cool remote:path/file
Or use rclone filters to set tier on only specific files
rclone --include "*.txt" settier Hot remote:path/dir
Or just provide remote directory and all files in directory will be tiered
rclone settier tier remote:path/dir
rclone settier tier remote:path [flags]
Options -h, --help   help for settier
rclone test Run a test command
Synopsis Rclone test is used to run test commands.
Select which test comand you want with the subcommand, eg
rclone test memory remote:
NB Be careful running these commands, they may do strange things so reading their documentation first is recommended.
Options -h, --help   help for test
• rclone test changenotify (https://rclone.org/commands/rclone_test_changenotify/) - Log any change notify requests for the remote passed in.
• rclone test histogram (https://rclone.org/commands/rclone_test_histogram/) - Makes a histogram of file name characters.
• rclone test info (https://rclone.org/commands/rclone_test_info/) - Discovers file name or other limitations for paths.
• rclone test makefiles (https://rclone.org/commands/rclone_test_makefiles/) - Make a random file hierarchy in a directory
• rclone test memory (https://rclone.org/commands/rclone_test_memory/) - Load all the objects at remote:path into memory and report memory stats.
rclone test changenotify Log any change notify requests for the remote passed in.
rclone test changenotify remote: [flags]
Options -h, --help                     help for changenotify --poll-interval duration   Time to wait between polling for changes (default 10s)
SEE ALSO • rclone test (https://rclone.org/commands/rclone_test/) - Run a test command
rclone test histogram Makes a histogram of file name characters.
Synopsis This command outputs JSON which shows the histogram of characters used in filenames in the remote:path specified.
The data doesn't contain any identifying information but is useful for the rclone developers when developing filename compression.
rclone test histogram [remote:path] [flags]
Options -h, --help   help for histogram
rclone test info Discovers file name or other limitations for paths.
Synopsis rclone info discovers what filenames and upload methods are possible to write to the paths passed in and how long they can be.  It can take some time.  It will write test files into the remote:path passed in.  It outputs a bit of go code for each one.
NB this can create undeletable files and other hazards - use with care
rclone test info [remote:path]+ [flags]
Options --all                    Run all tests --check-control          Check control characters --check-length           Check max filename length --check-normalization    Check UTF-8 Normalization --check-streaming        Check uploads with indeterminate file size -h, --help                   help for info --upload-wait duration   Wait after writing a file --write-json string      Write results to file
rclone test makefiles Make a random file hierarchy in a directory
rclone test makefiles <dir> [flags]
Options --files int                  Number of files to create (default 1000) --files-per-directory int    Average number of files per directory (default 10) -h, --help                       help for makefiles --max-file-size SizeSuffix   Maximum size of files to create (default 100) --max-name-length int        Maximum size of file names (default 12) --min-file-size SizeSuffix   Minimum size of file to create --min-name-length int        Minimum size of file names (default 4) --seed int                   Seed for the random number generator (0 for random) (default 1)
rclone test memory Load all the objects at remote:path into memory and report memory stats.
rclone test memory remote:path [flags]
Options -h, --help   help for memory
rclone touch Create new file or change file modification time.
Synopsis Set the modification time on file(s) as specified by remote:path to have the current time.
If remote:path does not exist then a zero sized file will be created, unless --no-create or --recursive is provided.
If --recursive is used then recursively sets the modification time on all existing files that is found under the path.  Filters are supported, and you can test with the --dry-run or the --interactive flag.
If --timestamp is used then sets the modification time to that time instead of the current time.  Times may be specified as one of:
• 'YYMMDD' - e.g.  17.10.30
• 'YYYY-MM-DDTHH:MM:SS' - e.g.  2006-01-02T15:04:05
• 'YYYY-MM-DDTHH:MM:SS.SSS' - e.g.  2006-01-02T15:04:05.123456789
Note that value of --timestamp is in UTC.  If you want local time then add the --localtime flag.
rclone touch remote:path [flags]
Options -h, --help               help for touch --localtime          Use localtime for timestamp, not UTC -C, --no-create          Do not create the file if it does not exist (implied with --recursive) -R, --recursive          Recursively touch all files -t, --timestamp string   Use specified time instead of the current time of day
rclone tree List the contents of the remote in a tree like fashion.
Synopsis rclone tree lists the contents of a remote in a similar way to the unix tree command.
$ rclone tree remote:path / ├── file1 ├── file2 ├── file3 └── subdir ├── file4 └── file5
1 directories, 5 files
You can use any of the filtering options with the tree command (e.g. --include and --exclude).  You can also use --fast-list.
The tree command has many options for controlling the listing which are compatible with the tree command.  Note that not all of them have short options as they conflict with rclone's short options.
rclone tree remote:path [flags]
Options -a, --all             All files are listed (list . files too) -C, --color           Turn colorization on always -d, --dirs-only       List directories only --dirsfirst       List directories before files (-U disables) --full-path       Print the full path prefix for each file -h, --help            help for tree --human           Print the size in a more human readable way. --level int       Descend only level directories deep -D, --modtime         Print the date of last modification. --noindent        Don't print indentation lines --noreport        Turn off file/directory count at end of tree listing -o, --output string   Output to file instead of stdout -p, --protections     Print the protections for each file. -Q, --quote           Quote filenames with double quotes. -s, --size            Print the size in bytes of each file. --sort string     Select sort: name,version,size,mtime,ctime --sort-ctime      Sort files by last status change time -t, --sort-modtime    Sort files by last modification time -r, --sort-reverse    Reverse the order of the sort -U, --unsorted        Leave files unsorted --version         Sort files alphanumerically by version
Copying single files rclone normally syncs or copies directories.  However, if the source remote points to a file, rclone will just copy that file.  The destination remote must point to a directory - rclone will give the error Failed to create file system for "remote:file": is a file not a directory if it isn't.
For example, suppose you have a remote with a file in called test.jpg, then you could copy just that file like this
rclone copy remote:test.jpg /tmp/download
The file test.jpg will be placed inside /tmp/download.
This is equivalent to specifying
rclone copy --files-from /tmp/files remote: /tmp/download
Where /tmp/files contains the single line
It is recommended to use copy when copying individual files, not sync. They have pretty much the same effect but copy will use a lot less memory.
Syntax of remote paths The syntax of the paths passed to the rclone command are as follows.
/path/to/dir This refers to the local file system.
On Windows \ may be used instead of / in local paths only, non local paths must use /.  See local filesystem (https://rclone.org/local/#paths- on-windows) documentation for more about Windows-specific paths.
These paths needn't start with a leading / - if they don't then they will be relative to the current directory.
remote:path/to/dir This refers to a directory path/to/dir on remote: as defined in the config file (configured with rclone config).
remote:/path/to/dir On most backends this is refers to the same directory as remote:path/to/dir and that format should be preferred.  On a very small number of remotes (FTP, SFTP, Dropbox for business) this will refer to a different directory.  On these, paths without a leading / will refer to your "home" directory and paths with a leading / will refer to the root.
:backend:path/to/dir This is an advanced form for creating remotes on the fly.  backend should be the name or prefix of a backend (the type in the config file) and all the configuration for the backend should be provided on the command line (or in environment variables).
rclone lsd --http-url https://pub.rclone.org :http:
To list all the directories in the root of https://pub.rclone.org/.
rclone lsf --http-url https://example.com :http:path/to/dir
To list files and directories in https://example.com/path/to/dir/
rclone copy --http-url https://example.com :http:path/to/dir /tmp/dir
To copy files and directories in https://example.com/path/to/dir to /tmp/dir.
rclone copy --sftp-host example.com :sftp:path/to/dir /tmp/dir
To copy files and directories from example.com in the relative directory path/to/dir to /tmp/dir using sftp.
Connection strings The above examples can also be written using a connection string syntax, so instead of providing the arguments as command line parameters --http-url https://pub.rclone.org they are provided as part of the remote specification as a kind of connection string.
rclone lsd ":http,url='https://pub.rclone.org':" rclone lsf ":http,url='https://example.com':path/to/dir" rclone copy ":http,url='https://example.com':path/to/dir" /tmp/dir rclone copy :sftp,host=example.com:path/to/dir /tmp/dir
These can apply to modify existing remotes as well as create new remotes with the on the fly syntax.  This example is equivalent to adding the --drive-shared-with-me parameter to the remote gdrive:.
rclone lsf "gdrive,shared_with_me:path/to/dir"
The major advantage to using the connection string style syntax is that it only applies to the remote, not to all the remotes of that type of the command line.  A common confusion is this attempt to copy a file shared on google drive to the normal drive which does not work because the --drive-shared-with-me flag applies to both the source and the destination.
rclone copy --drive-shared-with-me gdrive:shared-file.txt gdrive:
However using the connection string syntax, this does work.
rclone copy "gdrive,shared_with_me:shared-file.txt" gdrive:
Note that the connection string only affects the options of the immediate backend.  If for example gdriveCrypt is a crypt based on gdrive, then the following command will not work as intended, because shared_with_me is ignored by the crypt backend:
rclone copy "gdriveCrypt,shared_with_me:shared-file.txt" gdriveCrypt:
The connection strings have the following syntax
remote,parameter=value,parameter2=value2:path/to/dir :backend,parameter=value,parameter2=value2:path/to/dir
If the parameter has a : or , then it must be placed in quotes " or ', so
remote,parameter="colon:value",parameter2="comma,value":path/to/dir :backend,parameter='colon:value',parameter2='comma,value':path/to/dir
If a quoted value needs to include that quote, then it should be doubled, so
remote,parameter="with""quote",parameter2='with''quote':path/to/dir
This will make parameter be with"quote and parameter2 be with'quote.
If you leave off the =parameter then rclone will substitute =true which works very well with flags.  For example to use s3 configured in the environment you could use:
rclone lsd :s3,env_auth: