From owner-freebsd-questions@FreeBSD.ORG Sat Aug 14 23:01:51 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C64116A4CE for ; Sat, 14 Aug 2004 23:01:51 +0000 (GMT) Received: from grover.logicsquad.net (ppp52-132.lns1.adl2.internode.on.net [150.101.52.132]) by mx1.FreeBSD.org (Postfix) with SMTP id 35F0243D49 for ; Sat, 14 Aug 2004 23:01:47 +0000 (GMT) (envelope-from paulh@logicsquad.net) Received: (qmail 12488 invoked by uid 1000); 14 Aug 2004 23:01:43 -0000 Date: Sun, 15 Aug 2004 08:31:43 +0930 From: "Paul A. Hoadley" To: freebsd-questions@freebsd.org Message-ID: <20040814230143.GB8610@grover.logicsquad.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: find -exec surprisingly slow X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Aug 2004 23:01:51 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I'm in the process of cleaning a Maildir full of spam. It has somewhere in the vicinity of 400K files in it. I started running this yesterday: find . -atime +1 -exec mv {} /home/paulh/tmp/spam/sne/ \; It's been running for well over 12 hours. It certainly is working---the spams are slowly moving to their new home---but it is taking a long time. It's a very modest system, running 4.8-R on a P2-350. I assume this is all overhead for spawning a shell and running mv 400K times. Is there a better way to move all files based on some characteristic of their date stamp? Maybe separating the find and the move, piping it through xargs? It's mostly done now, but I will know better for next time. --=20 Paul. w http://logicsquad.net/ h http://paul.hoadley.name/ --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBHpnW730Z/jysbzIRAvwuAJ4mfuqtHaqKQGDKtcZrwpTKir5t5gCff8rR NM5fF8v7qgT8CS2delXdruE= =MZw2 -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--