Date: Sat, 17 Feb 2024 08:28:53 -0700 From: Gary Aitken <freebsd@dreamchaser.org> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: hard link pointing to itself? Message-ID: <ff6ee312-479f-47d2-ba4d-6694812d6db1@dreamchaser.org>
index | next in thread | raw e-mail
running 13.2-release, created a tar archive, went to extract on another 13.2-release system, and got several messages of the form: $ tar xf tmp.tar path-to-file/filename.jpg: Skipping hardlink pointing to itself: path-to-file/filename.jpg: File exists If I go to the source directory on the original system and do: find . | grep filename.jpg I see only one file. Any idea how this file could have been created? I'm pretty sure the original was a lower-resolution file written from gimp, but that wouldn't have been a hard link. There's a reasonable chance I tried to create a hard link at some point, but I don't see a reference to it. Suspiciously, the tarball had several of these, and quit after reporting a few on extraction. How does one tell it's a hard link? I can get the inode number using ls -il, but that doesn't tell me much regarding its being a hard link when there is only one file. Assuming I don't want to destroy the file, any suggestions on how to fix it? Copy to temp, remove/rename old file, rename? Garyhelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ff6ee312-479f-47d2-ba4d-6694812d6db1>
