-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2013-04-04 at 07:46 +0200, Per Jessen wrote:
Carlos E. R. wrote:
If is only analyzing inside bash scripts, why did it took so long?
Some possibilities
I timed it on another post :-)
- because 'file' has to process each and every file found. - because you have 25 gazillion files? :-) - because your disk is veeeerrrrryyyyyyyyy sssssssllllloooooowwwwww :-)
If you want to know if it is 'xargs file' or 'xargs grep':
It is the file command. There are, of course, many files. I don't know how many, because: Telcontar:~ # wc -l listadeficheros 4 listadeficheros because they are null terminated strings ;-) The timing was: +++···························· Telcontar:~ # time cat listadeficheros | xargs -0 file > lista.file_output real 129m13.901s user 56m40.918s sys 3m5.739s Telcontar:~ # ····························++- comparing cpu time to real time, there is a large waiting time, to be expected. No, my disks are not slow. They are not enterprise class, but they are reasonably fast. <http://susepaste.org/51338135>. That's 125 MB/S max on the vertical axis :-) (the horizontal axis is the partition number) - -- Cheers, Carlos E. R. (from 12.1 x86_64 "Asparagus" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAlFdNNcACgkQtTMYHG2NR9VqFACfaUAajpgj3kZ1QW7tlu+dL7LJ Xb0Anj6Tv+cbriS4Tl4lWkjeJqfl0bI2 =giYz -----END PGP SIGNATURE-----