How to use --files-from options ? #264
-
I want to move some specific files store in test.txt line by line from host to remote using this function, but How?
never suceed.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You must specify a source and destination directory for even a files-from copy. The paths in the files-from list are all relative to the source directory. Specify "/" as the source dir if you want to specify full, absolute paths in the file. Also, don't specify -z on local copies (I also recommend -i). So, you probably want to specify:
|
Beta Was this translation helpful? Give feedback.
You must specify a source and destination directory for even a files-from copy. The paths in the files-from list are all relative to the source directory. Specify "/" as the source dir if you want to specify full, absolute paths in the file. Also, don't specify -z on local copies (I also recommend -i). So, you probably want to specify:
rsync -aivh --files-from=test.txt / /home/user/path/tomove
or
rsync -aivh --files-from=test.txt . /home/user/path/tomove