Re: File listing mit flags Anzeige

From: Manfred Lotz <manfred.lotz(at)web.de>
Date: Sun, 30 Nov 2003 16:57:44 +0100

On Sunday 30 November 2003 15:06, Oliver Lehmann wrote:
> Manfred Lotz wrote:
> > Jetzt könnte ich es natürlich so machen:
> > find / -xdev -exec ls -ldo {} \;
> >
> > Jedoch ist dies naturgemäss äuserst langsam.
>
> olivleh1(at)kartoffel lib> /usr/bin/time find . -ls > /dev/null
> 0.40 real 0.18 user 0.04 sys
> olivleh1(at)kartoffel lib> /usr/bin/time find . -ls > /dev/null
> 0.30 real 0.19 user 0.04 sys
>
>
> olivleh1(at)kartoffel lib> /usr/bin/time find . | xargs ls -ldo > /dev/null
> 0.62 real 0.00 user 0.04 sys
> olivleh1(at)kartoffel lib> /usr/bin/time find . | xargs ls -ldo > /dev/null
> 0.32 real 0.01 user 0.03 sys
>
>
> olivleh1(at)kartoffel lib> /usr/bin/time find . | xargs printf "%s " | xargs
> ls -ldo > /dev/null
> 0.39 real 0.02 user 0.02 sys
> olivleh1(at)kartoffel lib> /usr/bin/time find . | xargs printf "%s " | xargs
> ls -ldo > /dev/null
> 0.23 real 0.00 user 0.04 sys
>
>
> olivleh1(at)kartoffel lib> /usr/bin/time find . -exec ls -ldo {} \;
>
> >/dev/null

Ich hatte vorher auch schon mit xargs herumprobiert, wohl aber Unsinn
gemessen??!!!

Messungen machen aber nur Sinn mit grossen Dateilisten. Da zeigt es sich dann,
dass die -exec Version elendig langsam wird.

Ja, du hast Recht. Die xargs Version (die 2.) ist wohl am einfachsten und vom
Zeitverhalten ok.

Manfred

To Unsubscribe: send mail to majordomo.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Sun 30 Nov 2003 - 17:00:27 CET

search this site