Thread: Hard Link Query
View Single Post

  #2 (permalink)  
Old 09-03-2007, 07:29 PM
monk's Avatar
monk monk is offline
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

Hello,

Welcome to forum!

Quote:
Originally Posted by sharadgana View Post
Hi,

I was recently reading about hardlinks and was told that hardlinks is not supported across directories i.e /home and /tmp etc.


I tried creating a hardlink between them and was able to create and access it

sharadg@tripwire:/tmp$ ln b /home/sharadg/a
sharadg@tripwire:/tmp$ ls -i b /home/sharadg/a
3424472 b 3424472 /home/sharadg/a


Can you explain this ?
Is /tmp and /home mounted on same partition? if so you should able to create a hard link. Rule is - Understanding UNIX / Linux symbolic (soft) and hard links :
Quote:
You cannnot cross or create a hard link between two partitions
  • Hard links cannot links directories
  • Cannot cross file system boundaries

Run mount command to verify
Code:
mount
Hit reply button if you need more information
__________________
May the force with you!
Reply With Quote