From owner-freebsd-questions Thu Mar 1 11:57:29 2001 Delivered-To: freebsd-questions@freebsd.org Received: from squid.tznet.com (www.jwenning.com [206.31.5.7]) by hub.freebsd.org (Postfix) with ESMTP id 83F6F37B718 for ; Thu, 1 Mar 2001 11:57:26 -0800 (PST) (envelope-from tech@squid.tznet.com) Received: from localhost (tech@localhost) by squid.tznet.com (8.11.2/8.11.2) with ESMTP id f21Jtsq18304 for ; Thu, 1 Mar 2001 13:55:55 -0600 (CST) Date: Thu, 1 Mar 2001 13:55:54 -0600 (CST) From: Scott Pilz To: freebsd-questions@freebsd.org Subject: Code Question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG With the number of intelligent people on this list (and some very accomplished coders) I thought that I would give this a go. For those of you familer with /var/mail/$user And hash spool 2, /var/mail/u/s/user This will be more obvious as to what I'm looking to do, other than that, try to follow the example, and thank you all for your replys. I'm looking for a program, shell, perl, you name it, that will do this much for me ... Take every file in /foo (such as /foo/apple /foo/peach /foo/orange), extract the first two characters, and then move them to a desired location by those two character matches. Example: /var/mail currently has 8k files, as well as directories a-z, 0-9. And those directories (a-z and 0-9) have there own directories (a-z and 0-9).. So, you have this: /var/mail/a/b /var/mail/a/c /var/mail/a/d and so on. Now lets say you have /var/mail/apple as a file. I need a script that will move /var/mail/* to: /var/mail/// /var/mail/apple -> /var/mail/a/p/apple The reasoning for this is simple. We have a mail server that we have been using without hash spool (qpopper pop3, sendmail smtp, procmail is the delivery agent). We want to use hash spool 2 to speed up things. I realize this may sound confusing, feel free to respond with any questions, and thanks again! -Scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message