I can read in the ln man page:
-L, --logical
make hard links to symbolic link references
I read somewhere that ln -L
could be used to re-link files that were deleted but which are still open, using the /proc
filesystem. For example:
ln -L /proc/1234/fd/12 /tmp/my-file
But I'm getting ENOENT
: No such file or directory. If I try on a different filesystem, I get instead Invalid cross-device link.
If I can't use ln -L
to recover deleted files, then what could it be used for?
Best Answer
GNU utilities are primarily documented with
info
pages. From the GNU ln info page:So this simply dereferences symbolic links given as source arguments.