Subject: Re: man links: hard/symbolic
To: Todd Vierling <tv@pobox.com>
From: Gandhi woulda smacked you <greywolf@starwolf.com>
List: tech-userlevel
Date: 04/23/1999 17:47:38
On Fri, 23 Apr 1999, Todd Vierling wrote:
# On Fri, 23 Apr 1999, Greg A. Woods wrote:
#
# Doing that for hard-links from a binary set is more difficult than renaming
# the targets and names of symlinks. Symlinks need only a little awk magic
# whereas matching up hard links is much more difficult.
Neh. The magic's just a little different.
Better to take the time and cast the right spell intent on permanence
than to pretend it's temporary and use spit and baling wire. It's a
matter of keeping track of inodes, basically:
first-file=${files[0]}
shift files;
gzip -c ${first-file} > ${first-file}.gz;
for file in ${files[*]}; do {
ln ${first-file}.gz ${file}.gz;
rm ${file};
}
done
Getting ahold of the inode numbers is left as an exercise for the reader.
#
# --
# -- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)
#
#
--*greywolf;
--
USL, Microsoft, IBM: The knights who say "NIH"!