I am a Unix wanderer. I just noticed that symlinks don't have data blocks allocated to them, I think the inode of the symlink file stores the filename which the symlink refers to, is this actually the case?

$ stat sdb
  File: sdb -> /dev/sdb
  Size: 8               Blocks: 0          IO Block: 4096   symbolic link
Device: 803h/2051d      Inode: 26348139    Links: 1

I could only imagine one possibility for now, the inode of sdb symlink contains among other things (i,e. owner, permissions...) + /dev/sdb path.


ext4 stores the target of a symbolic link inside the inode, if the target is less than 60 bytes long. Longer targets will be stored in a data block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.