1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 10:33:34 +00:00

docs: fix markdownlint issue md040/fenced-code-language

This commit is contained in:
albertony
2025-07-10 14:17:42 +02:00
parent 667ad093eb
commit 1c26f40078
11 changed files with 252 additions and 249 deletions

View File

@@ -22,7 +22,7 @@ file and choose its location.)
The easiest way to make the config is to run rclone with the config
option:
```
```sh
rclone config
```
@@ -99,7 +99,7 @@ Rclone syncs a directory tree from one storage system to another.
Its syntax is like this
```
```sh
rclone subcommand [options] <parameters> <parameters...>
```
@@ -114,7 +114,7 @@ used before the `subcommand`. Anything after a `--` option will not be
interpreted as an option so if you need to add a parameter which
starts with a `-` then put a `--` on its own first, eg
```
```sh
rclone lsf -- -directory-starting-with-dash
```
@@ -135,7 +135,7 @@ learning rclone to avoid accidental data loss.
rclone uses a system of subcommands. For example
```
```sh
rclone ls remote:path # lists a remote
rclone copy /local/path remote:path # copies /local/path to the remote
rclone sync --interactive /local/path remote:path # syncs /local/path to the remote
@@ -188,7 +188,7 @@ 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
```
```sh
rclone copy remote:test.jpg /tmp/download
```
@@ -196,13 +196,13 @@ The file `test.jpg` will be placed inside `/tmp/download`.
This is equivalent to specifying
```
```sh
rclone copy --files-from /tmp/files remote: /tmp/download
```
Where `/tmp/files` contains the single line
```
```sh
test.jpg
```
@@ -248,25 +248,25 @@ the command line (or in environment variables).
Here are some examples:
```
```sh
rclone lsd --http-url https://pub.rclone.org :http:
```
To list all the directories in the root of `https://pub.rclone.org/`.
```
```sh
rclone lsf --http-url https://example.com :http:path/to/dir
```
To list files and directories in `https://example.com/path/to/dir/`
```
```sh
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`.
```
```sh
rclone copy --sftp-host example.com :sftp:path/to/dir /tmp/dir
```
@@ -280,7 +280,7 @@ 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.
```
```sh
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
@@ -291,7 +291,7 @@ 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:`.
```
```sh
rclone lsf "gdrive,shared_with_me:path/to/dir"
```
@@ -302,13 +302,13 @@ 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.
```
```sh
rclone copy --drive-shared-with-me gdrive:shared-file.txt gdrive:
```
However using the connection string syntax, this does work.
```
```sh
rclone copy "gdrive,shared_with_me:shared-file.txt" gdrive:
```
@@ -317,13 +317,13 @@ 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:
```
```sh
rclone copy "gdriveCrypt,shared_with_me:shared-file.txt" gdriveCrypt:
```
The connection strings have the following syntax
```
```sh
remote,parameter=value,parameter2=value2:path/to/dir
:backend,parameter=value,parameter2=value2:path/to/dir
```
@@ -331,7 +331,7 @@ remote,parameter=value,parameter2=value2:path/to/dir
If the `parameter` has a `:` or `,` then it must be placed in quotes `"` or
`'`, so
```
```sh
remote,parameter="colon:value",parameter2="comma,value":path/to/dir
:backend,parameter='colon:value',parameter2='comma,value':path/to/dir
```
@@ -339,7 +339,7 @@ remote,parameter="colon:value",parameter2="comma,value":path/to/dir
If a quoted value needs to include that quote, then it should be
doubled, so
```
```sh
remote,parameter="with""quote",parameter2='with''quote':path/to/dir
```
@@ -350,13 +350,13 @@ 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:
```
```sh
rclone lsd :s3,env_auth:
```
Which is equivalent to
```
```sh
rclone lsd :s3,env_auth=true:
```
@@ -368,7 +368,7 @@ If you are a shell master then you'll know which strings are OK and
which aren't, but if you aren't sure then enclose them in `"` and use
`'` as the inside quote. This syntax works on all OSes.
```
```sh
rclone copy ":http,url='https://example.com':path/to/dir" /tmp/dir
```
@@ -377,7 +377,7 @@ strings in the shell (notably `\` and `$` and `"`) so if your strings
contain those you can swap the roles of `"` and `'` thus. (This syntax
does not work on Windows.)
```
```sh
rclone copy ':http,url="https://example.com":path/to/dir' /tmp/dir
```
@@ -387,13 +387,13 @@ If you supply extra configuration to a backend by command line flag,
environment variable or connection string then rclone will add a
suffix based on the hash of the config to the name of the remote, eg
```
```sh
rclone -vv lsf --s3-chunk-size 20M s3:
```
Has the log message
```
```sh
DEBUG : s3: detected overridden config - adding "{Srj1p}" suffix to name
```
@@ -404,13 +404,13 @@ This should only be noticeable in the logs.
This means that on the fly backends such as
```
```sh
rclone -vv lsf :s3,env_auth:
```
Will get their own names
```
```sh
DEBUG : :s3: detected overridden config - adding "{YTu53}" suffix to name
```
@@ -447,13 +447,13 @@ Here are some gotchas which may help users unfamiliar with the shell rules
If your names have spaces or shell metacharacters (e.g. `*`, `?`, `$`,
`'`, `"`, etc.) then you must quote them. Use single quotes `'` by default.
```
```sh
rclone copy 'Important files?' remote:backup
```
If you want to send a `'` you will need to use `"`, e.g.
```
```sh
rclone copy "O'Reilly Reviews" remote:backup
```
@@ -465,14 +465,14 @@ shell.
If your names have spaces in you need to put them in `"`, e.g.
```
```bat
rclone copy "E:\folder name\folder name\folder name" remote:backup
```
If you are using the root directory on its own then don't quote it
(see [#464](https://github.com/rclone/rclone/issues/464) for why), e.g.
```
```bat
rclone copy E:\ remote:backup
```
@@ -486,13 +486,13 @@ file or directory like this then use the full path starting with a
So to sync a directory called `sync:me` to a remote called `remote:` use
```
```sh
rclone sync --interactive ./sync:me remote:path
```
or
```
```sh
rclone sync --interactive /full/path/to/sync:me remote:path
```
@@ -507,7 +507,7 @@ to copy them in place.
Eg
```
```sh
rclone copy s3:oldbucket s3:newbucket
```
@@ -528,7 +528,7 @@ same.
This can be used when scripting to make aged backups efficiently, e.g.
```
```sh
rclone sync --interactive remote:current-backup remote:previous-backup
rclone sync --interactive /path/to/files remote:current-backup
```
@@ -768,7 +768,7 @@ excluded by a filter rule.
For example
```
```sh
rclone sync --interactive /path/to/local remote:current --backup-dir remote:old
```
@@ -796,7 +796,7 @@ You can use `--bind 0.0.0.0` to force rclone to use IPv4 addresses and
This option controls the bandwidth limit. For example
```
```sh
--bwlimit 10M
```
@@ -808,7 +808,7 @@ suffix B|K|M|G|T|P. The default is `0` which means to not limit bandwidth.
The upload and download bandwidth can be specified separately, as
`--bwlimit UP:DOWN`, so
```
```sh
--bwlimit 10M:100k
```
@@ -816,7 +816,7 @@ would mean limit the upload bandwidth to 10 MiB/s and the download
bandwidth to 100 KiB/s. Either limit can be "off" meaning no limit, so
to just limit the upload bandwidth you would use
```
```sh
--bwlimit 10M:off
```
@@ -872,11 +872,15 @@ be unlimited.
Timeslots without `WEEKDAY` are extended to the whole week. So this
example:
`--bwlimit "Mon-00:00,512 12:00,1M Sun-20:00,off"`
```sh
--bwlimit "Mon-00:00,512 12:00,1M Sun-20:00,off"
```
Is equivalent to this:
`--bwlimit "Mon-00:00,512Mon-12:00,1M Tue-12:00,1M Wed-12:00,1M Thu-12:00,1M Fri-12:00,1M Sat-12:00,1M Sun-12:00,1M Sun-20:00,off"`
```sh
--bwlimit "Mon-00:00,512Mon-12:00,1M Tue-12:00,1M Wed-12:00,1M Thu-12:00,1M Fri-12:00,1M Sat-12:00,1M Sun-12:00,1M Sun-20:00,off"
```
Bandwidth limit apply to the data transfer for all backends. For most
backends the directory listing bandwidth is also included (exceptions
@@ -894,14 +898,14 @@ of a long running rclone transfer and to restore it back to the value specified
with `--bwlimit` quickly when needed. Assuming there is only one rclone instance
running, you can toggle the limiter like this:
```
```sh
kill -SIGUSR2 $(pidof rclone)
```
If you configure rclone with a [remote control](/rc) then you can use
change the bwlimit dynamically:
```
```sh
rclone rc core/bwlimit rate=1M
```
@@ -912,7 +916,7 @@ This option controls per file bandwidth limit. For the options see the
For example use this to allow no transfers to be faster than 1 MiB/s
```
```sh
--bwlimit-file 1M
```
@@ -1114,7 +1118,7 @@ beginning of a line.
Example:
```
```ini
[megaremote]
type = mega
user = you@example.com
@@ -1199,7 +1203,7 @@ time rclone started up.
This disables a comma separated list of optional features. For example
to disable server-side move and server-side copy use:
```
```sh
--disable move,copy
```
@@ -1207,13 +1211,13 @@ The features can be put in any case.
To see a list of which features can be disabled use:
```
```sh
--disable help
```
The features a remote has can be seen in JSON format with:
```
```sh
rclone backend features remote:
```
@@ -1252,7 +1256,7 @@ can avoid occupying too much bandwidth in a network with DiffServ support ([RFC
For example, if you configured QoS on router to handle LE properly. Running:
```
```sh
rclone copy --dscp LE from:/from to:/to
```
@@ -1344,7 +1348,7 @@ This flag is supported for all HTTP based backends even those not
supported by `--header-upload` and `--header-download` so may be used
as a workaround for those with care.
```
```sh
rclone ls remote:test --header "X-Rclone: Foo" --header "X-LetMeIn: Yes"
```
@@ -1353,7 +1357,7 @@ rclone ls remote:test --header "X-Rclone: Foo" --header "X-LetMeIn: Yes"
Add an HTTP header for all download transactions. The flag can be repeated to
add multiple headers.
```
```sh
rclone sync --interactive s3:test/src ~/dst --header-download "X-Amz-Meta-Test: Foo" --header-download "X-Amz-Meta-Test2: Bar"
```
@@ -1365,7 +1369,7 @@ currently supported backends.
Add an HTTP header for all upload transactions. The flag can be repeated to add
multiple headers.
```
```sh
rclone sync --interactive ~/src s3:test/dst --header-upload "Content-Disposition: attachment; filename='cool.html'" --header-upload "X-Amz-Meta-Test: FooBar"
```
@@ -1493,7 +1497,7 @@ temporary file with an extension like this, where `XXXXXX` represents a
hash of the source file's fingerprint and `.partial` is
[--partial-suffix](#partial-suffix) value (`.partial` by default).
```
```text
original-file-name.XXXXXX.partial
```
@@ -1534,7 +1538,7 @@ especially with `rclone sync`.
For example
```
```sh
$ rclone delete --interactive /tmp/dir
rclone: delete "important-file.txt"?
y) Yes, this is OK (default)
@@ -1667,7 +1671,7 @@ once as administrator to create the registry key in advance.
severe) than or equal to the `--log-level`. For example to log DEBUG
to a log file but ERRORs to the event log you would use
```
```sh
--log-file rclone.log --log-level DEBUG --windows-event-log ERROR
```
@@ -1898,7 +1902,7 @@ it in `"`, if you want a literal `"` in an argument then enclose the
argument in `"` and double the `"`. See [CSV encoding](https://godoc.org/encoding/csv)
for more info.
```
```sh
--metadata-mapper "python bin/test_metadata_mapper.py"
--metadata-mapper 'python bin/test_metadata_mapper.py "argument with a space"'
--metadata-mapper 'python bin/test_metadata_mapper.py "argument with ""two"" quotes"'
@@ -2268,7 +2272,7 @@ for more info.
Eg
```
```sh
--password-command "echo hello"
--password-command 'echo "hello with space"'
--password-command 'echo "hello with ""quotes"" and space"'
@@ -2472,7 +2476,7 @@ or with `--backup-dir`. See `--backup-dir` for more info.
For example
```
```sh
rclone copy --interactive /path/to/local/file remote:current --suffix .bak
```
@@ -2483,7 +2487,7 @@ If using `rclone sync` with `--suffix` and without `--backup-dir` then
it is recommended to put a filter rule in excluding the suffix
otherwise the `sync` will delete the backup files.
```
```sh
rclone sync --interactive /path/to/local/file remote:current --suffix .bak --exclude "*.bak"
```
@@ -2851,8 +2855,8 @@ have to supply the password every time you start rclone.
To add a password to your rclone configuration, execute `rclone config`.
```
>rclone config
```sh
$ rclone config
Current remotes:
e) Edit existing remote
@@ -2865,7 +2869,7 @@ e/n/d/s/q>
Go into `s`, Set configuration password:
```
```sh
e/n/d/s/q> s
Your configuration is not encrypted.
If you add a password, you will protect your login information to cloud services.
@@ -3263,7 +3267,7 @@ so it can only contain letters, digits, or the `_` (underscore) character.
For example, to configure an S3 remote named `mys3:` without a config
file (using unix ways of setting environment variables):
```
```sh
$ export RCLONE_CONFIG_MYS3_TYPE=s3
$ export RCLONE_CONFIG_MYS3_ACCESS_KEY_ID=XXX
$ export RCLONE_CONFIG_MYS3_SECRET_ACCESS_KEY=XXX
@@ -3283,7 +3287,7 @@ You must write the name in uppercase in the environment variable, but
as seen from example above it will be listed and can be accessed in
lowercase, while you can also refer to the same remote in uppercase:
```
```sh
$ rclone lsd mys3:
-1 2016-09-21 12:54:21 -1 my-bucket
$ rclone lsd MYS3:
@@ -3298,7 +3302,7 @@ set the access key of all remotes using S3, including myS3Crypt.
Note also that now rclone has [connection strings](#connection-strings),
it is probably easier to use those instead which makes the above example
```
```sh
rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:
```