Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Mumbai, India

    I have found a way but it's not a lasting solution i.e only temporary ( unless given in the fstab)
    We can use the "--bind" option of the mount command to mount directory onto some other directory thus providing all the data and making it accesible on the mounted one, but then it actaully won't be a hardlink coz the data deleted on the monted one will result in loss on the real directory.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  2. #12
    Quote Originally Posted by Rubberman View Post
    So, why do you want a hard link to a directory?
    There is one use where it would be very valuable: incremental backups with rsync allow you to specify an older backup and use a hard link for any unchanged file. Has some very convenient results:
    * a backup as plain directory tree from which individual files can be retrieved without need for special tools
    * a complete directory tree for every backup
    * no waste of disk space for unchanged files
    * old versions of the backup can simply be deleted, freeing space for all files that don't exist in newer versions and leaving those intact that do

    The only drawback is the cost of inodes for large, unchanged subtrees. Hard links do not cost disk space but they do cost inodes. Hard linking subtrees would be a nice solution for this.

    However, I understand the problems with this:
    * each directory could have multiple parents which would break a fundamental assumption in most codes
    * if circular references are allowed, one would need to replace reference counting by garbage collection.
    * to disallow circular references, one would need to detect them first. This would mean scanning a whole super-tree. Possible but costly...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts