URL:
<https://savannah.gnu.org/bugs/?65831>
Summary: Test -type l is unsuccessful for symlink loops
Group: findutils
Submitter: jay
Submitted: Mon 03 Jun 2024 12:55:32 PM UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: Tavian Barnes
Originator Email:
Open/Closed: Open
Release: None
Discussion Lock: Any
Fixed Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 03 Jun 2024 12:55:32 PM UTC By: James Youngman <jay>
>From https://savannah.gnu.org/bugs/?51926#comment8
>Commit b12fb8c ("Fix sv bug #51926: -xtype l fails on symlinks that have a
loop") fixes this for -xtype, but what about
>$ ln -s loop loop
>$ find -L loop -type l
Right now we get this result:
$ find -L loop -type l
find: ‘loop’: Too many levels of symbolic links
The exit status is 1. Nothing is printed on stdout. The POSIX standard says
(in the non-normative RATIONALE section):
>Since the -L option resolves all symbolic links and the -type l primary is
true for symbolic links that still exist after symbolic links have been
resolved, the command:
>find -L . -type l
> prints a list of symbolic links reachable from the current directory that do
not resolve to accessible files.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65831>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/