[ale] interesting problem
Steve Litt
slitt at troubleshooters.com
Fri Jan 12 00:21:49 EST 2018
On Thu, 11 Jan 2018 15:04:33 -0500
Jim Kinney via Ale <ale at ale.org> wrote:
> 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.
I can't exactly visualize what you want to do with the discovered
symlinks, but my first thought would be to write a treewalker program.
It's pretty easy to write a C tree-walker program that performs a
specific action upon encountering a symlink. Because your wrote it in
C, it will be as fast as its algorithm. Depth-first tree walker
algorithms are pretty darn fast.
HTH,
SteveT
Steve Litt
January 2018 featured book: Troubleshooting: Why Bother?
http://www.troubleshooters.com/twb
More information about the Ale
mailing list