Why is it possible to create symbolic links across file system boundaries?

Posted on in Categories last updated August 28, 2006

Symbolic links link by pathname rather than inode number. As you know, each pathname is a unique file on a system. Because of this, it is possible to create symbolic links across file system boundaries. Try to create symbolic links using following command:

$ touch /home/you/file1
# ln -s /home/you/file1 /tmp/file2

Find out inode of both file1 and file2

# ls -i /home/you/file1

1567789

# ls -i /tmp/file2

1567795
As you can see inode number are unique to each file. So it is possible to create symbolic links across file system boundaries. Please note that in above example both /tmp and /home are two different file systems.

See also:

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Leave a Comment