Skipping hardlinks in a copy

Sriram Ramkrishna sramkris at ichips.intel.com
Thu Mar 8 21:36:03 GMT 2007


On Thu, Mar 08, 2007 at 10:14:39AM -0800, Wayne Davison wrote:
> On Wed, Mar 07, 2007 at 09:22:08PM -0800, Sriram Ramkrishna wrote:
> > Is there a way to have it skip hard links when doing an rsync?
> 
> If you mean you want to skip any file that has more than one link, you
> could do this:
> 
>     find . -type f -links +1 >/path/exclude.txt
> 
> Then, you'd use the exclude.txt file via the --exclude-from option.
> 
> However, you mentioned loops, and that makes me think that the problem
> is not with file loops, but dirs looping back in the hierarchy.  The
> above won't help you if that is the case (since find will loop too).

Indeed.  This is from watching rsync through strace since I wasn't sure
why it was taking so long to do an rsync.  It seems I need to collect
more data to see what's going on.

sri


More information about the rsync mailing list