Re: Change tar to GNU

From: Vladimir Grebenschikov <vova_at_fbsd.ru>
Date: Fri, 18 Feb 2005 12:47:11 +0300
В чт, 17/02/2005 в 11:55 -0800, Steve Kargl пишет:
> On Thu, Feb 17, 2005 at 01:42:58PM -0600, Jon Noack wrote:
> > Robert Watson wrote:
> > >On Thu, 17 Feb 2005, Kaspars wrote:
> > >> I have backup script build with tar and -newer options.
> > >>on FreeBSD 4.x it worked and i see:
> > >>$tar --version
> > >>tar (GNU tar) 1.13.25
> > >>
> > >>on FreeBSD 5.3 not working and I found:
> > >>$tar --version
> > >>bsdtar 1.01.011, libarchive 1.01.013
> > >>Copyright (C) 2003-2004 Tim Kientzle
> > >>
> > >>So I understand that you change own tar to make different licence. 
> > >>
> > >>I just thinking what is proper way to update tar to GNU tar to make
> > >>working again my script? 
> > >
> > >
> > >You can install the GNU tar as a package; however, it would be quite
> > >helpful if you could describe the problem in a little more detail so that
> > >the bug, if any, can be fixed.
> > 
> > I think the issue is simply that the --newer option does not exist in 
> > bsdtar.  A very brief glance at the bsdtar man page didn't reveal any 
> > replacement.
> > 
> 
> This is a Unix-like OS, so command pipes are possible.
> 
> find $PATH -newermt 20050214 | xargs tar cf new.tar

This is invalid example, xargs can invoke tar multiple times and
override archive, it should be as minimum -x key for xargs to fail in
case of too many files

find $PATH -newermt 20050214 | xargs -x tar cf new.tar

-- 
Vladimir B. Grebenchikov
vova_at_fbsd.ru
Received on Fri Feb 18 2005 - 08:47:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:28 UTC