Hard link a directory

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
COKEDUDE

Hard link a directory

Post by COKEDUDE »

Is it possible to Hard link a directory? Some people on google say it is possible and some say it is not possible. I haven't seen a working solution though.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
unexistance

Re: Hard link a directory

Post by unexistance »

Hi,

Try

Code: Select all

ln -d
Regards,
Habitual

Re: Hard link a directory

Post by Habitual »

Hard links take up twice as many inodes as softlinks.
COKEDUDE

Re: Hard link a directory

Post by COKEDUDE »

unexistance wrote:Hi,

Try

Code: Select all

ln -d
Regards,
It complains operation not permitted.
Habitual wrote:Hard links take up twice as many inodes as softlinks.
Ok. Is that a problem?
unexistance

Re: Hard link a directory

Post by unexistance »

Hi,

If you're trying to hardlink ext3 to NTFS, that might not work, as hardlink is supported in ext2, ext3, ext4...

Regards,
Habitual

Re: Hard link a directory

Post by Habitual »

COKEDUDE wrote:
unexistance wrote:Hi,

Try

Code: Select all

ln -d
Regards,
It complains operation not permitted.
Habitual wrote:Hard links take up twice as many inodes as softlinks.
Ok. Is that a problem?
Not if you have a 1Tb drive, it's not! :)

if /path/to/DIR1 is using 1.6G
then a hardlink to /path/to/DIR1 will also take up 1.6G
COKEDUDE

Re: Hard link a directory

Post by COKEDUDE »

Habitual wrote:
COKEDUDE wrote:
unexistance wrote:Hi,

Try

Code: Select all

ln -d
Regards,
It complains operation not permitted.
Habitual wrote:Hard links take up twice as many inodes as softlinks.
Ok. Is that a problem?
Not if you have a 1Tb drive, it's not! :)

if /path/to/DIR1 is using 1.6G
then a hardlink to /path/to/DIR1 will also take up 1.6G
I don't think what you said is correct. I made 6 hard links to a 700 MB file and my disc usage did not change at all. It stayed 16.9 GB of free space the whole time.
Locked

Return to “Software & Applications”