Mail Archives: cygwin/2007/12/11/15:01:14
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 -