[bug #66135] loop: different error messages describe an identical (?) error

Tavian Barnes <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
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 (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZt767gAKCRCqLAuaBUf3
TqxEAP41S+4gNYMe3kJ5J/9A4UHidqlvwxjrTTcvNkeLFe4gjgEA3YKXXdBB8BV6
9knWY1FXFmJqBOKHa83zfgv8OeTkuA4=
=fGUh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.