[ale] interesting problem

Jim Kinney jim.kinney at gmail.com
Thu Jan 11 15:04:33 EST 2018


Imagine a giant collection of files, several TB, of unknown directory
names and unknown directory depths at any point. From the top of that
tree, you need to cd into EVERY directory, find the symlinks in each
directory and remake them in a parallel tree on the same system but in
a different starting point. Rsync is not happy with the relative links
so that fails as each link looks to be relative to the location of the
process running rsync.

It is possible given the source of this data tree that recursive,
looping symlinks exist. That must be recreated in the new location.

It looks like a find to list all symlinks in the entire tree then cd to
each final location to recreate is best. That can be sped up with
running multiple processes splitting the link list into sections.

Better ideas? 
-- 
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20180111/da81ada9/attachment.html>


More information about the Ale mailing list