green
(green)
1
i have the following structure:
/source/
/source/file_a
/source/a_dir/file_b
/source/b_dir/file_c
i am testing the following command:
find /home/user/testing/source/ -maxdepth 1 ! -type l -print0 | xargs -I {} -0 rclone --ask-password=false --no-traverse --ignore-existing --transfers=6 copy {} amazon:testing/destination/
and I end up with:
/destination/file_a
/destination/file_b
/destination/file_c
when what I want is
/destination/file_a
/destination/a_dir
/destination/b_dir
any advice on what I am doing wrong?
ncw
(Nick Craig-Wood)
2
You need to include the directory on the destination to get the behaviour you want.
However if you use -files-from
you’ll get what you want, with the added bonus of it working faster
something like
cd /home/user/testing/source/
find . -maxdepth 1 ! -type | sed 's,^\./,,' > /tmp/files-from-list
rclone --ask-password=false --ignore-existing --transfers=6 --files-from /tmp/files-from-list copy /home/user/testing/source/ amazon:testing/destination/
(note that --files-from
implies --no-traverse
)
green
(green)
3
looks good. i will definitely use --files-from thanks