[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to detect symlinks?
- From: Rena <hyperhacker@...>
- Date: Mon, 30 Apr 2012 00:16:25 -0600
On Mon, Apr 30, 2012 at 00:11, Jeff Pohlmeyer <email@example.com> wrote:
> On Mon, Apr 30, 2012 at 1:04 AM, Rena <firstname.lastname@example.org> wrote:
>> Thanks, that appears to work.
> It also looks like the "mode" string for symlinkattributes will return
> "link" for symbolic
> links, so that would probably be simpler (and more self-documenting.)
Ah, did I miss that or is it not documented?
>> Still is there a way to open the link itself instead of the file it points to?
> Just curious, why would you want to do that?
> - Jeff
I'm iterating a filesystem recursively, comparing backups to the
original files to verify integrity. Following links means potentially
getting stuck in a loop (as I found the hard way). The backups are
made with rsync, preserving links, so I think it should be enough to
verify the links themselves (i.e. ensure that the link points to the
Sent from my Game Boy.