From: "Olson, Arthur David (NCI)" <olsona@dc37a.nci.nih.gov> Date: Tue, 19 Mar 2002 09:31:43 -0500
What I'm after is something that handles such real-world cases correctly; I'm willing to let non-real-world cases slide.
How about something like the following algorithm? It should handle the real-world cases. (1) try hard link and exit if this succeds (2) try to make a copy (like "cp"), and exit if this succeeds (3) report a failure One advantage of this approach over symlinks is that cases (1) and (2) have more-similar behavior from the user's point of view, since zic removes any existing hard links to the destination before writing it. A disadvantage of symlinks is that if you later update the source of the symlink, you also update its destination, and this differs in behavior from (1). symlinks don't save much if any disk space here, since the files are so tiny. On my Solaris 8 host, a symlink takes up at least 1024 bytes, and most of the zoneinfo files are smaller than that.