Hi,

Seen with tar-1.23 on a glibc system:
  $ tar cf - . -C /mnt
has a different effect than
  $ tar cf - -C /mnt .

How to reproduce:

  $ cd $HOME
  $ tar cvf - . -C /mnt > /dev/null
  [lists the files of your home directory]
  $ tar cvf - -C /mnt . > /dev/null
  [lists the files under /mnt]

I consider this a bug for two reasons:

1) glibc systems use GNU getopt. It allows to mix command line options with
   regular arguments. The very idea of this feature is that
     PROG ARGS OPTIONS
   is equivalent to
     PROG OPTIONS ARGS

2) The only effect of the -C option when creating an archive is to set the
   directory relative to which the source directory is interpreted. It is
   certainly not the intent of the user to specify an option that has no
   effect (and indeed 'tar' has not warned about this option having no effect).

Bruno

Reply via email to