![]() You can't really do any harm with it as it's a "read-only" tool - so it's great to use to look at some details of the filesystem. It's no longer supported but it still works on both Snow Leopard and Leopard - basically any HFS+ supported system. It's free and I encourage you to download it and try it out. It's a very interesting piece of software and will tell you lots of details about HFS+ file systems. If you want more details see his web site at Amit Singh's hfsdebug utility. I discovered the info about the super-magical, super-hidden location by reading Amit Singh's explanation of his "hfsdebug" utility. Does anyone have any idea why Mac OS X goes to all this effort for this hard link creation to folders? Does it have something to do with the fact that this is a "journaled" file system? It seems so very weird that all this overhead occurs just for the simple task of creating a hard link to a folder. ![]() ![]() So it might be a good idea to try this out on a volume you have a good backup of just in case. This is what worked for me, so can't guarantee this will work for you too. Then copy the files you saved to the temporary locations back to their original locations and you should be back in business. If you do find yourself in this situation with "orphaned blocks", first save the changed files to some other temporary location not in the volume containing the "source_folder" tree, then use "Disk Utility" to unmount and remount the volume that contains the "source_folder" or just restart the computer. If you run "Verify disk" in the "Disk Utility" program, you will notice that it probably complains and gives a "Volume bitmap needs minor repair for orphaned blocks" which is what just happened with the creation of the super-magical folder and the movement of the "source_folder" to it. I noticed that you couldn't do a "ls -la" command any longer without getting funny errors for all the folders/directories that were in the original "source_folder" but you could do a "ls" command and all looked well. This happened to me a couple of times until it dawned on me what was happening and the solution is pretty simple. So because of this, you have to be careful of not having any files open in the "source_folder" because if you do, they just got moved to the super-magical folder and you will likely have a problem if you try and save any changes to those files that were open in the "source_folder". One really important issue is that the folder you create the link to is really moved to a super-magical super-hidden folder called /.HFS+ Private Directory Data%000d/dir_xxx where xxx is the inode number of the "source_folder" - remember the format of the command is hlink source_folder target_folder When you create them there is really a lot that happens "behind the curtain" of Mac OS X. One other "gotcha" that I just learned about these "hard links" to folders. What you've done for later on or for someone else who might need to know this. So, be careful if you try it - remember to follow the rules and use hlink to create these hard links and use hunlink to remove the hard link afterwards. Here is the "hunlink.c" program: #include I just tried it and it works fine on my Snow Leopard 10.6.6 system - tried it on the boot volume and on a separate USB external volume and it worked fine in both cases. I just verified that link/unlink do work on Snow Leopard - as long as you follow the six ![]() So it's not correct at all that Snow Leopard has lost the ability to create hard links to
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |