This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: find . -regex '.*js' -type f -exec md5sum '{}' \\; really slow!


Great!

the command 

/usr/bin/find . -type f -exec md5sum '{}' \\;

takes 3min 10s

the command

/usr/bin/find . -type f -exec md5sum \{} +

takes 25s.

the command

find . -type f  | xargs md5sum

takes 17s

Many thanks, best regards!

B.Nicolotti

Il giorno lun, 24/11/2008 alle 16.35 +0100, JÃrg Schaible ha scritto:
> cygwin-owner@cygwin.com wrote:
> > Hi,
> > 
> > I'm using  the command:
> > 
> > /usr/bin/find . -type f -exec md5sum '{}' \\;
> > 
> > to compare the content of two subtree(161Mbytes) on different systems,
> > one linux, and the other on windows with cygwin.
> > 
> > The command on linux takes some seconds, while on windows+cygwin
> > takes some minutes. 
> > 
> > Could some one help me to speed-up things on windows+cygwin?
> 
> Don't run the command for each file, try to use as much files as you can on one line (use '+' instead of ';'):
> 
> /usr/bin/find . -type f -exec md5sum \{} +
> 
> Hint: A fork is expensive in Cygwin ...
> 
> - JÃrg
-- 
Bartolomeo Nicolotti
SIAP s.r.l.
www.siapcn.it
v.S.Albano 13 12049
TrinitÃ(CN) Italy
ph:+39 0172 652553
centralino: +39 0172 652511
fax: +39 0172 652519


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]