delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/11/15:01:14

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <afe5197f0712111200h62dba298qa54ee0a0d6f25e15@mail.gmail.com>
Date: Tue, 11 Dec 2007 20:00:45 +0000
From: "Richard Copley" <rcopley AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: question with xargs and jar- seems to drop files.
In-Reply-To: <BAY108-W200973B554B568C4991162BE6E0@phx.gbl>
MIME-Version: 1.0
References: <042c01c836a1$e6c0d1d0$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20071205123104 DOT GH26345 AT calimero DOT vinschen DOT de> <04a001c8374f$a58b1a00$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20071205153214 DOT GI26345 AT calimero DOT vinschen DOT de> <04a801c83756$90a8b5f0$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20071205172520 DOT GB3147 AT ednor DOT casa DOT cgf DOT cx> <04b901c83767$91e6f290$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <BAY108-W200973B554B568C4991162BE6E0 AT phx DOT gbl>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 05/12/2007, Mike Marchywka <marchywka AT hotmail DOT com> wrote:
> I  seem to have an odd problem with xargs and jar. I'm not sure if I can isolate a simple test
> case but essentially it only seems to be taking some of the input files.
>
> This seems to work suggesting the file list is acceptable to jar:
>
> $ more latest65day | jar -@cvf wtf2.zip>jarlog2.txt
>
> this, however, only includes a some files, apparently lopping off certain directories:
>
> $ more latest65day | xargs jar -cvf wtf2.zip>jarlog.txt
>
>
> $ xargs --version
> GNU xargs version 4.3.8
> Built using GNU gnulib version 2007-05-26
>
> Administrator AT TESTBED01 /cygdrive/e/new/temp
> $ jar -V
> jar (fastjar) 0.92-gcc
>
> Copyright 1999, 2000, 2001  Bryan Burns
> Copyright 2002 Free Software Foundation
>
> Thoughts on diagnostic process of known problems? At first, I thought it had to do with
> errors encountered during the jarring but I think I've eliminated all of those ( missing files
> mostly). Also, as I indicated before, my configuration is suspect but I wouldn't expect it
> to cause problems like this.

I expect you've got this covered, but last week when I had a similar
problem with xargs and tar, it turned out that my problem was that I
hadn't read the xargs manpage (not recently anyway). Its second
sentence is "xargs ... executes the  command ... one or more times
...". The solution was to use tar's --files-from option. For jar: -@,
see above (except that you should redirect jar's standard input to
your file-of-files with "<latest65day", rather than using "more" and a
pipe. http://groups.google.co.uk/group/comp.unix.shell/search?q=useless+use+of+cat
;).

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019