Follow-up Comment #3, bug #46305 (project findutils):

With "-L bar -delete", find would have to delete 2 files:
a) the symlink target '../foo', and
b) the symlink itself 'bar/baz'.

I agree with James that trying to fix (or work around) this
would probably more ask for trouble than being of help.

>From 'man find':

  -L   ... Actions that can cause  symbolic  links  to  become
       broken while find is executing (for example -delete)
       can give rise to confusing behaviour.

Depending on where the symlink points to, deleting possibly
the opposite way up the tree sounds too dangerous IMO; consider:
  ln -s ../../../../../../..  kllr-slink
or the 'symlink-to-root' example James gave.

Finally, also rm(1) and rmdir(1) do not have an -L option - probably
for a good reason.

Have a nice day,
Berny

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46305>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to