LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-09-2013, 10:53 PM   #16
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,491

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621

Quote:
Originally Posted by Peverel View Post
However, the soft link points to an absolute address, which is the old, superseded, directory entry.
No! A soft link simply contains a path (either relative or absolute) and will be resolved by the kernel just like any other path. It will always reach the file that currently has the name contained in the path, i.e., the new file. There is no way (via the filesystem**) to reach the old, unlinked file unless it had another hard link.

** For a file still held open by a process, there is a way via /proc to reach the inode even though there is no longer any link within the filesystem.
 
1 members found this post helpful.
Old 01-10-2013, 09:03 AM   #17
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,397

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114
If you examine a soft-link, you will find that it literally consists of a file with a directory-name in it. But the filesystem knows what it is and how to treat it when encountering it in a directory search-path. The soft link is resolved by performing a name-lookup at that time. It's entirely possible to have erroneous soft-links that identify directories which either do not exist or are not accessible, and when this is the case, the attempt to use the link does not succeed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference Between Soft Link & Hard Link rajaniyer123 Solaris / OpenSolaris 16 09-30-2012 03:42 AM
soft link puntino Linux - Newbie 9 03-30-2012 03:31 AM
create soft link and hard link in RHEL5 ramadas88 Linux - Server 6 09-15-2010 04:32 AM
hard link and soft link varunrapelly Linux - Newbie 9 10-02-2008 07:05 AM
Soft Link and Hard Link Moataz Red Hat 1 04-25-2005 06:30 AM


All times are GMT -5. The time now is 08:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration