[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hard link questions
On Sun, Jun 08, 2003 at 11:11:47AM -0700, Allen Curtis wrote:
> 1. Is there an easy way to determine if a file is actually a hard link? (or
> locate files with multiple references?)
Every file name associated with a "real file" is a hardlink. (Device
files and symlinks aren't quite "real files". I don't think the names in
directories for these items quite count as "hardlinks". I don't know
how I'd classify named pipes. I bet they are closer to "hardlinks"
than not. :)
> 2. What are the circumstances where symbolic links do not work? I love
> symbolic links but some utilities such as "tftp" doesn't follow the link.
Symbolic links are entirely up the application in question. They can
decide for themselves whether they wish to use lstat(2) or stat(2), or
whether they should pass O_NOFOLLOW to open(2), etc. tar(1) can switch
between behaviors with -h; GNU ls support -d, -H, -L. BSD ls supports -d
and -l. etc.
In short -- no easy answer.
--
"It seems the power has been robbed from the founding fathers and is now
firmly in the hand of the funding fathers." -- Rik van Riel
PGP signature