Hey, I'm no MS-DUH expert (as anyone on these lists will testify :),
but my understanding of the FAT FS is somewhat like this:

- FS is divided into 3 parts: root directory, FAT and data.

- All directories except root are in the data portion.

- Data portion is divided into clusters, of say 1KB each.

- The FAT itself is a map of the clusters.  Each FAT entry is 12 or 16
bits long (or 32 bits in newer MS OS's), depending on how many
clusters there are on the partition.

- Directory entries contain file name and starting cluster number.

- The FAT entry corresponding to the starting cluster contains the
number of the next cluster (#2).  FAT entry for cluster #2 contains
number of cluster #3, etc, until the last entry which contains some
magic number like 0xfffe or something.

So in theory it is definitely possible to have two directory entries
pointing to the same starting FAT entry, and then they will
effectively refer to the same file.  However,

- This is treated as an error by MS-DUH and Winduhs filesystem tools.

- If you change the file, the changed meta-data (modification time,
flags, size, etc.) will only show up in one of the directory entries.

- It is possible for a file operation to change the starting cluster
of the file.  In this case, only one entry would get updated, and the
second entry would be pointing into the wild blue yonder, i.e. major
filesystem corruption.  Defragmenting the disk, e.g., will almost
definitely ruin your ``hard links''.

I don't know of any software which allows you to maintain links using
this mechanism.  Also, as sreangsu mentions in his mail, Winduhs has
some sort of linking mechanism.

[Pondering the serious off-topic-ness of this whole discussion.]

Regards,

-- Raju


>>>>> "ambarish" == ambarish pathak <[EMAIL PROTECTED]> writes:

    ambarish> Raju Mathur wrote:
    >> FAT /does/ allow sort of hard links (duplicate entries in the
    >> file table pointing to the same FAT entry), but (a) I'm not
    >> aware of any FAT implementation which permits you make hard
    >> links and (b) such entries are considered filesystem errors by
    >> MS' file check utilities (chkdsk, etc).

    ambarish> can u elaborate please. i thought there was a
    ambarish> contracdiction in terms between 1st and 2nd sentence(a)
    ambarish> above.

    ambarish> how do u make the hardlinks in the File Allocation Table
    ambarish> (forget the chkdsk thing).
-- 
Raju Mathur          [EMAIL PROTECTED]           http://kandalaya.org/

----------------------------------------------
LIH is all for free speech.  But it was created
for a purpose.  Violations of the rules of
this list will result in stern action.

Reply via email to