Date: Fri, 9 Aug 2002 08:01:38 +0200 (SAT) From: John Hay <jhay@icomtek.csir.co.za> To: cjc@FreeBSD.ORG (Crist J. Clark) Cc: doconnor@gsoft.com.au (Daniel O'Connor), freebsd-stable@FreeBSD.ORG Subject: Re: Tar not following links now? Message-ID: <200208090601.g7961cN92156@zibbi.icomtek.csir.co.za> In-Reply-To: <20020809053552.GA79890@blossom.cjclark.org> from "Crist J. Clark" at "Aug 8, 2002 10:35:52 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> On Fri, Aug 09, 2002 at 11:12:47AM +0930, Daniel O'Connor wrote: > > I recently updated several machines to -stable (OpenSSL :) and found > > that tar nolonger seems to follow links. > > > > [cain 11:06] ~/projects/rrd >ls -lad /home > > lrwxr-xr-x 1 root wheel 9 Mar 15 12:26 /home -> /usr/home > > [cain 11:09] ~/projects/rrd >ls -lad /usr/home > > drwxr-xr-x 16 root wheel 512 Mar 28 10:05 /usr/home > > [cain 11:05] ~/projects/rrd >tar -Pcf - /home/ | tar -tvf - > > lrwxr-xr-x root/wheel 0 Mar 15 12:26 2002 /home -> /usr/home > > [cain 11:08] ~/projects/rrd >uname -a > > FreeBSD cain.gsoft.com.au 4.6-STABLE FreeBSD 4.6-STABLE #10: Tue Aug 6 11:49:28 CST 2002 doconnor@cain.gsoft.com.au:/usr/obj/usr/src/sys/CAIN i386 > > > > As opposed to my older system > > [chowder 11:10] ~ >ls -lad /home > > lrwx------ 1 root wheel 9 Aug 20 2001 /home -> /usr/home > > [chowder 11:10] ~ >ls -lad /usr/home > > drwxr-xr-x 4 root wheel 512 Jul 20 17:04 /usr/home > > [chowder 11:09] ~ >tar -Pcf - /home/ | tar -tvf - > > drwxr-xr-x root/wheel 0 Jul 20 17:04 2002 /home/ > > drwxr-xr-x radar/radar 0 Aug 9 10:35 2002 /home/radar/ > > [ .... ] > > [chowder 11:09] ~ >uname -a > > FreeBSD chowder.gsoft.com.au 4.6-PRERELEASE FreeBSD 4.6-PRERELEASE #12: Fri May 10 15:54:54 CST 2002 darius@chowder.gsoft.com.au:/usr/obj/usr/src/sys/CHOWDER i386 > > > > It seems like a bit of a POLA violation especially as the man page > > doesn't appear to mention and option to get the old behaviour back. > > The "new" behavior is the correct behavior. I'm not sure when or why > things were broken in your 4.6-PRERELEASE example. The option you want > is the '-h' option. That won't give the same behaviour. With the old tar, links inside wasn't followed by default. The problem is with the startpoint. With the old tar there was a difference between these two invocations if /home was a symlink: tar cf /dev/null /home tar cf /dev/null /home/ The first would just backup the symlink and the second would backup where /home points to. Symlinks inside of it would still not be replaced with their targets. John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208090601.g7961cN92156>