Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Nov 2008 16:33:22 +0200
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Eugene Grosbein <eugen@kuzbass.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: find -L . -type l -delete
Message-ID:  <491C3AB2.5010706@icyb.net.ua>
In-Reply-To: <20081113141726.GA26583@svzserv.kemerovo.su>
References:  <491C2DEB.3010504@icyb.net.ua> <20081113141726.GA26583@svzserv.kemerovo.su>

next in thread | previous in thread | raw e-mail | index | archive | help
on 13/11/2008 16:17 Eugene Grosbein said the following:
> On Thu, Nov 13, 2008 at 03:38:51PM +0200, Andriy Gapon wrote:
> 
>> Am I stupid or is our 'find' is seriously broken in one subtle feature?
>>
>> $ find -L . -type l
>> find all broken symlinks (target doesn't exists)
>>
>> $ find -L . -type l -delete
>> removes all symlinks!!!
> 
> Yes.
> 
>> FreeBSD 7.1-PRERELEASE amd64
> 
> This is pretty old and known problem:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/90687

Wow, that's pretty tough.
I always relied on the following 3 step procedure:
1. find ... -print
2. verify output
3. find ... -delete
[Profit!]

But now I will have to re-tune myself to xargs.


-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?491C3AB2.5010706>