mirror of
https://github.com/rclone/rclone
synced 2024-12-21 11:45:56 +01:00
docs: improve --files-from documentation
This commit is contained in:
parent
e9fd2250eb
commit
3f9d0d3baf
@ -290,23 +290,33 @@ from the sync.
|
|||||||
### `--files-from` - Read list of source-file names ###
|
### `--files-from` - Read list of source-file names ###
|
||||||
|
|
||||||
This reads a list of file names from the file passed in and **only**
|
This reads a list of file names from the file passed in and **only**
|
||||||
these files are transferred. The filtering rules are ignored
|
these files are transferred. The **filtering rules are ignored**
|
||||||
completely if you use this option.
|
completely if you use this option.
|
||||||
|
|
||||||
This option can be repeated to read from more than one file. These
|
This option can be repeated to read from more than one file. These
|
||||||
are read in the order that they are placed on the command line.
|
are read in the order that they are placed on the command line.
|
||||||
|
|
||||||
Prepare a file like this `files-from.txt`
|
Paths within the `--files-from` file will be interpreted as starting
|
||||||
|
with the root specified in the command. Leading `/` characters are
|
||||||
|
ignored.
|
||||||
|
|
||||||
|
For example, suppose you had `files-from.txt` with this content:
|
||||||
|
|
||||||
# comment
|
# comment
|
||||||
file1.jpg
|
file1.jpg
|
||||||
file2.jpg
|
subdir/file2.jpg
|
||||||
|
|
||||||
Then use as `--files-from files-from.txt`. This will only transfer
|
You could then use it like this:
|
||||||
`file1.jpg` and `file2.jpg` providing they exist.
|
|
||||||
|
|
||||||
For example, let's say you had a few files you want to back up
|
rclone copy --files-from files-from.txt /home/me/pics remote:pics
|
||||||
regularly with these absolute paths:
|
|
||||||
|
This will transfer these files only (if they exist)
|
||||||
|
|
||||||
|
/home/me/pics/file1.jpg → remote:pics/file1.jpg
|
||||||
|
/home/me/pics/subdir/file2.jpg → remote:pics/subdirfile1.jpg
|
||||||
|
|
||||||
|
To take a more complicated example, let's say you had a few files you
|
||||||
|
want to back up regularly with these absolute paths:
|
||||||
|
|
||||||
/home/user1/important
|
/home/user1/important
|
||||||
/home/user1/dir/file
|
/home/user1/dir/file
|
||||||
@ -325,7 +335,11 @@ You could then copy these to a remote like this
|
|||||||
rclone copy --files-from files-from.txt /home remote:backup
|
rclone copy --files-from files-from.txt /home remote:backup
|
||||||
|
|
||||||
The 3 files will arrive in `remote:backup` with the paths as in the
|
The 3 files will arrive in `remote:backup` with the paths as in the
|
||||||
`files-from.txt`.
|
`files-from.txt` like this:
|
||||||
|
|
||||||
|
/home/user1/important → remote:backup/user1/important
|
||||||
|
/home/user1/dir/file → remote:backup/user1/dir/file
|
||||||
|
/home/user2/stuff → remote:backup/stuff
|
||||||
|
|
||||||
You could of course choose `/` as the root too in which case your
|
You could of course choose `/` as the root too in which case your
|
||||||
`files-from.txt` might look like this.
|
`files-from.txt` might look like this.
|
||||||
@ -338,7 +352,11 @@ And you would transfer it like this
|
|||||||
|
|
||||||
rclone copy --files-from files-from.txt / remote:backup
|
rclone copy --files-from files-from.txt / remote:backup
|
||||||
|
|
||||||
In this case there will be an extra `home` directory on the remote.
|
In this case there will be an extra `home` directory on the remote:
|
||||||
|
|
||||||
|
/home/user1/important → remote:home/backup/user1/important
|
||||||
|
/home/user1/dir/file → remote:home/backup/user1/dir/file
|
||||||
|
/home/user2/stuff → remote:home/backup/stuff
|
||||||
|
|
||||||
### `--min-size` - Don't transfer any file smaller than this ###
|
### `--min-size` - Don't transfer any file smaller than this ###
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user