On 16/01/18 08:52, jdd@dodin.org wrote:
Le 15/01/2018 à 18:10, Bernhard Voelker a écrit :
no, the problem is: "Not such file or directory" In the above context, I would think that ln did not find the file on the source tree.
found the problem. ln can't create path
solution: use first find to do it
find /data-ssd480/mesdocs-jdd/ -type d -exec mkdir -p /data-ssd480/tmp/{} \;
then
find /data-ssd480/mesdocs-jdd/ -type f ! -newermt 2016-01-01 -exec ln '{}' '/data-ssd480/tmp/{}' \;
That's why, in all my scripts that do this sort of thing, they take a directory argument and have three phases ... Phase 1 - set up the current directory as required Phase 2 - process all the files in the current directory (I tend to use Perl, and there's a function that reads the directory returning the names of all the files) Phase 3 - process all the sub-directories (same function, different args) and recurse into the directories. It might be a lot more verbose, but it's simpler to understand than one or two "find --exec" commands with lots of options you can never remember. Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org