On 05/14/2010 04:30 PM, Bruno Haible wrote: > Hi, > > Seen with tar-1.23 on a glibc system: > $ tar cf - . -C /mnt > has a different effect than > $ tar cf - -C /mnt .
Not a bug. Tar has to consider legacy operation, when you don't use a leading - in front of short options. You probably want: $ tar -cf - . -C /mnt or: $ tar cfC - /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 Only when you use the dashed form of short opts, and not the legacy dashless form. This is documented in the tar manual. -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
