Ugh, top posting. Oh, well... First off, <http://cygwin.com/acronyms/#PCYMTNQREAIYR>. Thanks.
Secondly, did you get a chance to read "man find"? It contains loads of fascinating information about the "find" command, including examples for doing exactly what you want with the "-path" option... This is not Cygwin-specific in any way, BTW. Igor On Mon, 18 Oct 2004, Siegfried Heintze wrote: > Thank you very much. > > I have a follow on question: I'm in /cygdrive/c/Program Files/Apache > Group/Apache and I want to back up my work. I don't want to back up the bin > directory, or the error directory or the logs directory... > > How do I exclude these directories? The following does not work: > > /usr/bin/find . -type f ! -path \^\.\/bin | less > > Thanks, > Siegfried > > > >-----Original Message----- > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Pechtchanski > >Sent: Friday, October 15, 2004 9:40 AM > >To: Siegfried Heintze > >Cc: [EMAIL PROTECTED] > >Subject: Re: Selectively zipping files together > > > >On Thu, 14 Oct 2004, Siegfried Heintze wrote: > > > >> I'm trying to use sun's jar utility (from Sun's java development kit) > >> along with the Cygwin find command to selectively zip together a > >> directory tree and send it to someone that can explode the tree using > >> WinZIP or PKZIP. > >> > >> I suppose it off topic to discuss the jar utility here. I'm looking for > >> an appropriate mailing list to solicit help with jar (suggestions are > >> welcome). > >> > >> The following does not work because it just grabs all the files in my > >> directory. I tried using the -print on find that did not help. I tried > >> removing the "@" pipe find into xargs and that did not work. > >> > >> /usr/bin/find "." \( ! -name \*.pch -a ! -path \*CVS\* \) | jar cvf@ > >> ..\\archive.zip > > > >To put this on-topic, use the java wrapper scripts I posted a while ago > >(they are also in the cygwin-apps CVS, under wrappers/java). They contain > >a "jar" wrapper script (which needs to be edited, hence it's not a package > >yet) that understands Cygwin paths, etc. So, basically, you'll need to > >run > > > >/usr/bin/find . -type f -a ! -name \*.pch -a ! -path \*CVS\* | /usr/local/bin/jar > >cvf@ ../archive.jar > > > >> Since we are not allowed to discuss jar here, is there a Cygwin utility that > >> produces Windows ZIP files that will work with find? > > > >Or just use the 'zip' utility from the 'zip' package (D'Oh!). > > > >> I even tried tar (even though it is not the format I want). Why does this > >> not work? > >> > >> /usr/bin/find "." \( ! -name \*.pch -a ! -path \*CVS\* \) | xargs tar cvf > >> ../archive.zip > > > >Again, /usr/bin/find . -type f -a ! -name \*.pch -a ! -path \*CVS\* -print0 | xargs > >-r0 tar cjvf ../archive.tar.bz2 > > > >> The problem is the same: all the files are included. I also, for all of > >> the above, tried using the -print on the find command but that did not > >> help. > > > >'-print' is the default action. You were missing the '-type f' > > > >> Oh - and one last question: is there any document that compares bzip with > >> bzip2 and gnuzip and winzip? > > > >Ain't no such animal as 'gnuzip' -- did you mean 'gzip'? 'bzip' is a > >patent-ridden ancestor to 'bzip2', and is rarely used these days (if at > >all). See, for example, the 'bzip' article at > ><http://encyclopedia.thefreedictionary.com/Bzip> (the sixth match in a > >Google search for 'bzip', BTW). > > Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ [EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Happiness lies in being privileged to work hard for long hours in doing whatever you think is worth doing." -- Dr. Jubal Harshaw -- 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/