So, the symlink is for us lazy programmers? <grin>. I guess the makefile for 
something with hardlinks would include an "ln" to reassign the hardlinks once 
the new program is written to disk.

--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

> -----Original Message-----
> From: Linux on 390 Port [mailto:[email protected]] On 
> Behalf Of Fuzzy Logic
> Sent: Monday, January 04, 2010 4:05 PM
> To: [email protected]
> Subject: Re: Philosopy question: hardlink vs. symlink
> 
> A hardlink is marginally more work because it could require walking
> the directory chain more than once. A hardlink has an inode pointer in
> it already, so once you've found the file and have permission to it,
> you don't need to look anymore. For a symlink, you have to walk the
> path again to find the "real" file referred to in the symlink.
> 
> As long as the tool that updates a file doesn't unlink one of the
> hardlinked members, a change to one would be reflected in the others.
> 
> However, most compilers do just that on the final step to create the
> binary which would break the connection.
> 
> A snippet from strace -f gives:
> 
> 26090 stat64("myexec", {st_mode=S_IFREG|0755, st_size=14773, ...}) = 0
> 26090 lstat64("myexec", {st_mode=S_IFREG|0755, st_size=14773, 
> ...}) = 0
> 26090 unlink("myexec")                   = 0
> 26090 open("myexec", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
> 
> A symlink would be blissfully unaware of the file changing 
> underneath it.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to