Follow-up Comment #2, bug #66135 (group findutils): ln -s link link is a symbolic link loop. You can't dereference this link at all:
$ ln -s link link
$ stat -L link
stat: cannot statx 'link': Too many levels of symbolic links
$ cat link
cat: link: Too many levels of symbolic links
$ ls -L link
ls: cannot access 'link': Too many levels of symbolic links
ln -s . link is _not_ a symbolic link loop! You can dereference it:
$ ln -s . link
$ stat -L link
File: link
Size: 904 Blocks: 0 IO Block: 4096 directory
Device: 0,44 Inode: 18767458 Links: 1
Access: (0750/drwxr-x---) Uid: ( 1000/tavianator) Gid: ( 1000/tavianator)
Access: 2024-09-09 09:37:16.795319268 -0400
Modify: 2024-09-09 09:37:16.935322293 -0400
Change: 2024-09-09 09:37:16.935322293 -0400
Birth: 2021-06-30 14:48:16.026406491 -0400
$ ls -L link
ABOUT-NLS
AUTHORS
COPYING
...
link
...
Find reports an error for this kind of loop because otherwise it would never
stop printing link, link/link, link/link/link, etc. But that's different from
the first kind of loop, so the different error makes sense.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66135>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
