That's essentially correct. If you remove a symlink, you remove a shortcut and the original file still exists.
If you remove what a symlink points to and the symlink is left intact, it is an invalid link. The data is gone and if you reference the symlink you'll get an error. Regular (hard) links share the same inode (data on disk if you will). For UNIX geeks, you can verify this with the "ls -i" option. If you remove one copy, you don't lose the data because there are other links to it. Each has its place. Hard links cannot span filesystems (e.g. don't work across NFS) because each filesystem has its own inode table. One nice use for using either is to maintain one file (e.g. program) and have it interrogate how it was invoked and act appropriately based upon that information. In Perl this might looks something like this: # Common code no matter how it was invoked. .... if ($0 eq "/path/to/prog1.pl") { print "This is executed as program 1\n"; } else { print "Any other name... calls this code\n"; } # More common code Very useful for security, argument processing, etc. --Chuck > ------------------------------------------------ > On Tue, 26 Nov 2002 12:00:00 +0530, Ramprasad A Padmanabhan ><[EMAIL PROTECTED]> wrote: > > > this is more of a unix question than perl. > > > > As far as I understand a symbolic link of a file is a simple shortcut > > file ( you can take the analogy of lnk files on windows ). Whenever any > > operation is done ( except some like 'rm' ) the kernel redirects the > > request to the main file > > > > A link on the other hand is a copy of the file. But the files share the > > same inode ( You better do some more google research for better info ) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]