On 01/14/2018 11:55 AM, jdd@dodin.org wrote:
Le 14/01/2018 à 08:47, David C. Rankin a écrit :
On 01/11/2018 12:13 PM, jdd@dodin.org wrote:
I would like to use the --delete option, because I may remove old files on source
thanks jdd
My first thought is use use 'find' to dump the list of files you want to transfer for each period of time (each year) to a file (e.g. <yearfile>). Either using the
-newermt <start date> ! -newermt <stop date>
I tested this and it don't seems to work.
Hmm.. Not sure where the hiccup is. Let's say you want all files from 2014, you can do: find . -maxdepth 1 -type f -newermt 2013-12-31 ! -newermt 2015-01-01
one of the reason I use it is when a target medium is full, with --delete-before to make room, this allows adding more target medium simply by changing one of the date with limited work
(the man page does a pretty good job explaining)
there is no real way to explain simply hard things :-(. The rsync man page is an example of very hard to follow text
Yes it can be clear as mud at times, but I suspect that is just due to how massively capable rsync is and the volume of information needed to accurately describe its workings. You could literally use the 'find` command above and parse per-year files with, e.g. for year in {2000..2018}; do find . -maxdepth 1 -type f -newermt $((year-1))-12-31 ! -newermt $((year+1))-01-01 done Whether you use --delete-before or --delete it should work the same. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org