Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 1996 09:58:34 -0600
From:      "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
To:        questions@freebsd.org
Subject:   Re: backing up files newer than DATE with tar
Message-ID:  <9601121558.AA01054@iworks.InterWorks.org>

next in thread | raw e-mail | index | archive | help

I wrote:

> I've been trying to back up files newer than a certain date with the
> tar -N (--after, --newer) option.  I am running 2.1 and have read
> the manpages and --help options, but can't find what I'm doing 
> wrong.
> 
> bash$ ls -l
> total 10
> drwxr-xr-x   2 eghk  other   512 Jan 12 10:45 .
> drwxr-xr-x  31 eghk  other  1024 Jan 12 10:45 ..
> -rw-r--r--   1 eghk  other     6 Jan 12 10:45 junk1
> -rw-r--r--   1 eghk  other     6 Jan 12 10:45 junk2
> -rw-r--r--   1 eghk  other     6 Jan 12 10:45 junk3
> bash$ date
> Fri Jan 12 10:46:15 EST 1996
> bash$ tar -cvf /dev/null --newer "Jan 12 10:46:15" *
> junk1
> junk2
> junk3
> bash$ tar -cvf ../junk.tar --newer "Jan 12 10:46:15" *
> junk1
> junk2
> junk3
> bash$ tar -tvf ../junk.tar
> -rw-r--r-- eghk/other        6 Jan 12 10:45 1996 junk1
> -rw-r--r-- eghk/other        6 Jan 12 10:45 1996 junk2
> -rw-r--r-- eghk/other        6 Jan 12 10:45 1996 junk3
> bash$
> 
> In a similar fashion, I can't get the --listed-incremental option to
> work either.
> 
> I know I could use find to generate the list of files, but I'd rather
> figure out why tar doesn't work for me.
> 
> Anyone want to tell me what I've done wrong (incorrectly)?

I found that using "Jan 13 xx:xx" as the date worked as documented.
I take it this only works for days, not hours?

Dan Eischen
deischen@iworks.InterWorks.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9601121558.AA01054>