delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <0c6501c1bed4$f548d5e0$0300a8c0@bluebox> |
From: | "Eugene Rosenzweig" <eugenius AT dingoblue DOT net DOT au> |
To: | <cygwin AT cygwin DOT com> |
Subject: | tar -f behaviour |
Date: | Wed, 27 Feb 2002 01:50:38 +1100 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
Looking at tar I noticed a small oddity in its behaviour, as compared to what I would have thought was 'normal' When dealing with files, using dash before options, the 'f' option has to be the last one in the option string, e.g. tar -tfz tarball.tar.gz works while tar -ftz tarball.tar.gz doesn't reporting that file 'tz' does not exist. It seems that 'f' anything after the 'f' option is considered to be the archive filename. tar -f tarball.tar.gz -tz works. When dash is absent the oddity is absent too, tar ftz tarball.tar.gz works with options f, t and z in any combination whatsoever. There is no tar manpage on my system. I looked at 'tar --help' for option explanation which didn't offer anything and I compared with linux tar behaviour. The linux version doesn't exhibit any pickiness about position of 'f' option when dash is being used. I do not have any experience with unix command line parsing but I wonder if the presence of this behaviour only when there is a dash indicates it has got something to do with getopt() or popt? I do not seem to have manpage for getopt() either even though it is references in popt manpage. In conclusion, is this a bug or a feature? PS I checked the package listing on http://cygwin.com, there is no man page with tar distribution. There is tar.texi in the source package. Maybe there should be manpage in the binary package. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |