Creating hard link from command line OS X 10.6.7

Joined
Mar 31, 2011
Messages
3
Reaction score
0
Points
1
I've tried to create a hard link (not a symbolic link) at my command line as:

Code:
ln /path/to/stored/file.prf /path/where/I/want/it/file.prf

but when I alter either file, the other one remains unchanged. It is no different from simply copying the file.

Is this a bug? Or perhaps user error? I've done this in Linux (both native and Cygwin) and it works.
 
OP
J
Joined
Mar 31, 2011
Messages
3
Reaction score
0
Points
1
I've found an answer to my own problem, so I'll post it here for posterity.

The problem has to do with the editor being used, not the OS, so perhaps this post is miscategorized.

Most Mac editors, when editing a file, do what is called a "safe save" which means they actually delete and replace the file. This is true of TextEdit and TextWrangler, though not true of TextMate. I discovered by downloading a trial copy of TextMate that I could not replicate the problem, but didn't want to pay $60 for a text editor.

Instead, I emailed the folks at Bare Bones Software (TextWrangler) who told me how to disable this behavior in TextWrangler. Pull up a terminal window and enter the following command:

Code:
defaults write com.barebones.textwrangler Filing:SafeSavesDisabled -bool YES

Now, when I use TextWangler to edit my file, the hard link is maintained.
 

BrianLachoreVPI


Retired Staff
Joined
Feb 24, 2011
Messages
3,733
Reaction score
124
Points
63
Location
Maryland
Your Mac's Specs
March 2011 15" MBP 2.3GHz i7 Quad Core 8GB Ram | Mid 2011 27" iMac 3.4 GHz i7 16 GB RAM 2 TB HDD
Well - just so you don't think your effort was wasted - Thanks for posting the solution :)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top