LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Rsync syntax help (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-syntax-help-4175599980/)

horizn 02-17-2017 08:01 AM

Rsync syntax help
 
I need to rsync only .bin files younger than 1 day from folders beginning name with 14. and 11. but also containing sub-folders with different names.

I tried with:
Code:

rsync -Rarv  `find /mnt/NFS_SERVER/ftp/etv/ -type f -mtime -1` --prune-empty-dirs --include "14.*/"  --include="*.bin" --exclude="*" "/mnt/NFS_SERVER/ftp/abc/" "/home/ftp/abc/"
but end up with nothing.

business_kid 02-17-2017 09:01 AM

Have you tried with find?

find <options> | xargs <command to operate on find's output>

sort of thing?

horizn 02-24-2017 07:10 AM

Quote:

Originally Posted by business_kid (Post 5672047)
Have you tried with find?

find <options> | xargs <command to operate on find's output>

sort of thing?

OK, solved this using:

rsync -dPt --ignore-existing --files-from=/tmp/files.txt /mnt/IP/ftp/source /home/ftp/destination

business_kid 02-25-2017 04:10 AM

Glad you're sorted. I'm not sure if you have to be that specific with rsync, as it transfers nothing if the files are identical and it's very quick. It would only be sensible if yoiu had an awful lot of files.


All times are GMT -5. The time now is 06:39 AM.