Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do hard links and soft (symbolic) link take same space in the linux filesystem? [closed]

Tags:

I have gone through a number of docs. which have lot of discrepancies over either hardlinks or softlinks taking any space in the file system.Can anyone clear this out for me?

For hardlinks i found out this:

I had a file c1 in my home directory which i hardlinked with d1 in same directory.both c1 and b1 have 11 byte size.Now when i am doing a "ls -lrt" the total bytes for all files listed(excluding d hidden files ofcourse) is 64 bytes. now when i remove hardlink d1 and again do a ls -lrt it gives me 60 bytes.does that not mean hardlinks occupy space in hard disk, but lot of docs.negate this fact, why?

I could have checked same way creating a soft link for the file and then deleting it, but since my soft link has only 2bytes size,i dont think deleting it would have any significant effect on the round off total size listed in the output of ls -lrt.

So what is with this?