Le 12/01/2018 à 00:46, Bernhard Voelker a écrit :
do you want to archive based on the timestamps of the files,
this. I want to keep the original directory tree, but only with the files of the given dates
So you could use that to move all those files into a 2012 folder (untested!):
$ find . -type f -newermt 2012-01-01 ! -newermt 2013-01-01 -print0 \ | rsync -HAXaxi --from0 --files-from=- . /path2/archive-2012/.
It's nearly what I expected, thanks. I use the (mounted) path of the sd card as destination, works as root (to preserve permissions) and can omit the first -newer for a simple "from date". Use of ! on the second newer is very smart. however, I don't fully understand how it works. Specially I guess find send the file names one at a time, but do rsync take them one by one, copying them one at a time, or as a list, waiting to the list to be complete to begin writing. In other words, will the option --delete works? I'm also surprised to see the "dot", I was thinking of the files as source and if I get it well, file list is only a test on the "." source that need to be set. the "-i" output is not that easy to understand neither anyway, I wouldn't have got that command line without help, thanks a lot! jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org