Re: Mails auf einem IMAP Server in andere Folder verschieben

From: Oliver Fromme <olli(at)lurza.secnetix.de>
Date: Tue, 28 Jun 2005 12:11:50 +0200 (CEST)

J. Erik Heinz <jerik(at)gmx.net> wrote:
> Oliver Fromme <olli(at)lurza.secnetix.de>:
> > J. Erik Heinz <jerik(at)gmx.net> wrote:
> > > if test $(ls INBOX.freebsd | wc -l) -gt 8000; then
> > > find INBOX.freebsd -mtime -35 | xargs -I § mv § INBOX.freebsd.old
> > > fi
> >
> > [...]
> > if [ $(ls -f INBOX.freebsd | wc -l) -gt 8000 ]; then
> > find INBOX.freebsd -mtime +35 | xargs -J% mv % INBOX.freebsd.old
> > fi
> >
> > Da die Reihenfolge beim »ls« egal ist, sollte man die Opti-
> > on -f verwenden. Eine möglicherweise zehnstellige Anzahl
> > von Dateinamen zu sortieren muß nicht sein.
>
> Daraus entnehmen ich mal, das die Verwendung von -f, die Ausführung
> beschleunigt, da keine Sortierung erfolgt. Ansonsten wäre es ja egal.

Ja, wie man in ls(1) nachlesen kann. In einem Verzeichnis
mit 12724 Einträgen (reproduzierbar; alle Daten im Cache):

$ time ls | wc -l
0.11s user 0.01s system 98% cpu 0.119 total
   12724

$ time ls -f | wc -l
0.03s user 0.01s system 84% cpu 0.046 total
   12724

> [...]
> > $ dd if=/dev/urandom of=test.pl count=1
> > $ file test.pl
> > test.pl: perl script text executable
>
> Da scheint es unterschiede zu geben ;)

Ja, natürlich. Wenn der Pseudozufallszahlengenerator gut
ist, sollte er irgendwann auch mal einen gültigen C-Quell-
text hervorbringen. ;-)

Gruß
   Olli

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 28 Jun 2005 - 12:12:27 CEST

search this site