bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: bug#28079: find -type l -xtype and recursive symbolic links


From: Pádraig Brady
Subject: Fwd: bug#28079: find -type l -xtype and recursive symbolic links
Date: Sun, 13 Aug 2017 21:27:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Forwarding to the appropriate list...


-------- Forwarded Message --------
Subject: bug#28079: find -type l -xtype and recursive symbolic links
Resent-Date: Sun, 13 Aug 2017 16:44:01 +0000
Resent-From: Poor Yorick <address@hidden>
Resent-CC: address@hidden
Date: Sun, 13 Aug 2017 14:06:19 +0300
From: Poor Yorick <address@hidden>
To: address@hidden

When a find expression includes both the -type and -xtype options and a
symbolic link that points to itself is encountered (a recursive symlink),
find fails with the error message, "Too many levels of symbolic links".

the -L option combined with the -type option also triggers the error:

     find -L . -type l

One reason to use both -type and -xtype is to skip broken symbolic links:

     -type l -not -xtype l

It would be useful in this case for a symbolic link that points to itself to be
considered broken by failing the "-xtype l" test.  If the bug was
fixed without also making this adjustment, there would be no way to exclude
symbolic links that point to themselves.  One alternative would be to introduce
a new type specifically for a symbolic link that points to itself.  Another
alternative would be to introduce some sort of meta option to pass information
about the current file to an option.  Maybe it would look like this:

     -meta -lname name


-- 
Yorick







reply via email to

[Prev in Thread] Current Thread [Next in Thread]