From: brian@ilinx.wimsey.bc.CA
Subject: tar cvfN doesn't work
Organization: InterLinx Support Services Inc.
Distribution: gnu
Date: Tue, 6 Oct 1992 18:43:34 GMT

MACHINE: DG Aviion 4320
O/S: DG/UX 5.4.1
UTILITY: gnu tar
VERSION 1.11
FEATURE -N --newer backup modified files

DESCRIPTION:

The -N option of gnutar seems to only partially work.  Given a sample dir
structure below, a gnutar command, it's results, and a list of the resulting
archive, I'm sure you will see what the problem is.

Gnutar seems to only work on files newer (-N) in the current directory, but
works on all files in any subdirectories.  Why is this??  

>From the example provided, should testdir and it's contents not get skipped 
due to being older than the "newer" date specified??

I though maybe the date on the directory was "newer" and therefore the
contents were being dumped.  You will notice however, from the example I have
provided, this is not the case.

directory structure:
NOTE: testdir is just a copy of the contents of it's parent, it's not an
error.

total 6686
-rw-rw-r--   1 peter    general     2607 Oct  5 17:47 archive
-rw-------   1 brian    general     1926 Oct  5 18:38 bjm
-rw--w--w-   1 root     other       1432 Oct  2 16:38 confax
-rw-r--r--   1 root     other     826144 Oct  6 11:18 core
-rw-------   1 root     other          0 Oct  1 02:03 croutIVIa0006R
-rw-------   1 root     other          0 Oct  1 02:03 croutJVIa0006R
-rw-------   1 root     other          0 Oct  6 02:03 croutNMNa0006R
-rw-------   1 root     other          0 Oct  6 02:03 croutOMNa0006R
-rw-r--r--   1 root     other        144 Sep 30 11:11 ftpfiles
-rw--w--w-   1 root     other      14816 Sep 29 08:33 image
-rwx------   1 brian    general    39676 Oct  6 11:13 mbox.brian
-rw-------   1 root     other        964 Sep 30 11:17 me
-rw-r--r--   1 root     other        952 Sep 30 11:18 me2
-rw-r--r--   1 root     other         85 Sep 26 12:50 sysadm.err.10913
-rw-r--r--   1 root     other         85 Sep 26 13:04 sysadm.err.11054
drwxr-xr-x   2 root     other        512 Jan  1  1992 testdir
-rw-r--r--   1 brian    general   394629 Oct  5 14:52 wpboard
-rw-r--r--   1 brian    general   384453 Oct  5 14:55 wpboard2

./testdir:
total 1673
-rw-rw-r--   1 root     other       2607 Jan  1  1992 archive
-rw-------   1 root     other       1926 Jan  1  1992 bjm
-rw--w--w-   1 root     other       1432 Jan  1  1992 confax
-rw-------   1 root     other          0 Jan  1  1992 croutIVIa0006R
-rw-------   1 root     other          0 Jan  1  1992 croutJVIa0006R
-rw-------   1 root     other          0 Jan  1  1992 croutNMNa0006R
-rw-------   1 root     other          0 Jan  1  1992 croutOMNa0006R
-rw-r--r--   1 root     other        144 Jan  1  1992 ftpfiles
-rw--w--w-   1 root     other      14816 Jan  1  1992 image
-rwx------   1 root     other      39676 Jan  1  1992 mbox.brian
-rw-------   1 root     other        964 Jan  1  1992 me
-rw-r--r--   1 root     other        952 Jan  1  1992 me2
-rw-r--r--   1 root     other         85 Jan  1  1992 sysadm.err.10913
-rw-r--r--   1 root     other         85 Jan  1  1992 sysadm.err.11054
-rw-r--r--   1 root     other     394629 Jan  1  1992 wpboard
-rw-r--r--   1 root     other     384453 Jan  1  1992 wpboard2
 
command and results:

/dev/pts/2 on imcon> gnutar.1.11 cvfN /tmp/backfile "10/06/92" *            
gnutar.1.11: archive: is unchanged; not dumped
gnutar.1.11: bjm: is unchanged; not dumped
gnutar.1.11: confax: is unchanged; not dumped
core
gnutar.1.11: croutIVIa0006R: is unchanged; not dumped
gnutar.1.11: croutJVIa0006R: is unchanged; not dumped
croutNMNa0006R
croutOMNa0006R
gnutar.1.11: ftpfiles: is unchanged; not dumped
gnutar.1.11: image: is unchanged; not dumped
mbox.brian
gnutar.1.11: me: is unchanged; not dumped
gnutar.1.11: me2: is unchanged; not dumped
gnutar.1.11: sysadm.err.10913: is unchanged; not dumped
gnutar.1.11: sysadm.err.11054: is unchanged; not dumped
testdir/
testdir/archive
testdir/bjm
testdir/confax
testdir/croutIVIa0006R
testdir/croutJVIa0006R
testdir/croutNMNa0006R
testdir/croutOMNa0006R
testdir/ftpfiles
testdir/image
testdir/mbox.brian
testdir/me
testdir/me2
testdir/sysadm.err.10913
testdir/sysadm.err.11054
testdir/wpboard
testdir/wpboard2
goutar.1.11: wpboard: is unchanged; not dumped
gnutar.1.11: wpboard2: is unchanged; not dumped

the contents of the archive:

/dev/pts/2 on imcon> gnutar.1.11 tvf backfile                                 
-rw-r--r-- root/other   826144 Oct  6 11:18 1992 core
-rw------- root/other        0 Oct  6 02:03 1992 croutNMNa0006R
-rw------- root/other        0 Oct  6 02:03 1992 croutOMNa0006R
-rwx------ brian/general 39676 Oct  6 11:13 1992 mbox.brian
drwxr-xr-x root/other        0 Jan  1 12:00 1992 testdir/
-rw-rw-r-- root/other     2607 Jan  1 12:00 1992 testdir/archive
-rw------- root/other     1926 Jan  1 12:00 1992 testdir/bjm
-rw--w--w- root/other     1432 Jan  1 12:00 1992 testdir/confax
-rw------- root/other        0 Jan  1 12:00 1992 testdir/croutIVIa0006R
-rw------- root/other        0 Jan  1 12:00 1992 testdir/croutJVIa0006R
-rw------- root/other        0 Jan  1 12:00 1992 testdir/croutNMNa0006R
-rw------- root/other        0 Jan  1 12:00 1992 testdir/croutOMNa0006R
-rw-r--r-- root/other      144 Jan  1 12:00 1992 testdir/ftpfiles
-rw--w--w- root/other    14816 Jan  1 12:00 1992 testdir/image
-rwx------ root/other    39676 Jan  1 12:00 1992 testdir/mbox.brian
-rw------- root/other      964 Jan  1 12:00 1992 testdir/me
-rw-r--r-- root/other      952 Jan  1 12:00 1992 testdir/me2
-rw-r--r-- root/other       85 Jan  1 12:00 1992 testdir/sysadm.err.10913
-rw-r--r-- root/other       85 Jan  1 12:00 1992 testdir/sysadm.err.11054
-rw-r--r-- root/other   394629 Jan  1 12:00 1992 testdir/wpboard
-rw-r--r-- root/other   384453 Jan  1 12:00 1992 testdir/wpboard2


-- 
Brian J. Murrell                                        brian@ilinx.wimsey.bc.ca
InterLinx Support Services, Inc.                        uunet!van-bc!ilinx!brian
North Vancouver, B.C.
        Platform and Brand Independent UNIX Support - R3.2 - R4 - BSD

Newsgroups: gnu.utils.bug