Re: how to detect a hard link in Java?



On 2005-08-31, Andrew Thompson penned:
> On 30 Aug 2005 18:39:47 -0700, jojo wrote:
>
>> I have an application need to detect the hard links ...
>
> What's a 'soft link'?

Serious question, or are you just pointing out that this is
OS-dependent?

On a unix system the difference is between 'ln -s' vs 'ln' ... off the
top of my head ...

Hrm. It's hard to explain off the top of my head, even though I know
the difference at a gut level.

If you create hard links to a filename, each hard link is just as
valid as the original filename. It's just as proper to say that
hardlink1 "is" the file as it is to say that filename "is" the file.
When all hard links are removed, the file is deleted. A soft link, on
the other hand, is a pointer to a filename ... in fact, a soft link
may even be sensitive to relative path location, and will break if you
move the original file.

Hrm. Clear as mud. It's clear in my head =/

--
monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
.



Relevant Pages

  • Re: Re: Job Depends On This
    ... >>> Windows XP that users probably don't know but could probably ... >> floppy they lose the 10MB ADS attached to that file. ... you can create soft links and hard links. ... Deleting a soft link ...
    (microsoft.public.windowsxp.general)
  • Re: Mapping a directory to another for a non-privileged user
    ... path is referenced in some of the tools, including some binaries. ... not allowed to create soft or hard links in system directories. ... create a soft link /tmp/shahswimtools pointing to the actual directory ... directory will not work easily with many freeware utilities I pick off ...
    (comp.unix.admin)
  • Re: how to detect a hard link in Java?
    ... >>> I have an application need to detect the hard links ... ... > valid as the original filename. ... A soft link, on ... > move the original file. ...
    (comp.lang.java.programmer)
  • Re: [SLE] How to identify a hard link from a soft link?
    ... link is another file name to the same physical file on disk. ... special file containing the path to a regular file. ... But for hard links I do not see any such special mark except that ... Every item in a directory is a hard link, unless it's a soft link. ...
    (SuSE)
  • Re: how to detect a hard link in Java?
    ... >>> I have an application need to detect the hard links ... ... It's hard to explain off the top of my head, ... > valid as the original filename. ... A soft link, on ...
    (comp.lang.java.programmer)