From owner-freebsd-questions Thu Oct 23 21:35:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA20959 for questions-outgoing; Thu, 23 Oct 1997 21:35:10 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from mail.netcetera.dk (root@sleipner.netcetera.dk [194.192.97.2]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA20954 for ; Thu, 23 Oct 1997 21:35:06 -0700 (PDT) (envelope-from leifn@swimsuit.roskildebc.dk) Received: (from uucp@localhost) by mail.netcetera.dk (8.8.7/8.8.7) with UUCP id GAA13261 for freebsd-questions@freebsd.org; Fri, 24 Oct 1997 06:32:54 +0200 Received: by swimsuit.roskildebc.dk (0.99.970109) id AA01950; 24 Oct 97 01:07:49 +0100 From: leifn@swimsuit.roskildebc.dk (Leif Neland) Date: 23 Oct 97 15:09:22 +0100 Subject: Re: deleted huge directory Message-ID: <211_9710240107@swimsuit.roskildebc.dk> References: <19971023163601.11925@lemis.com> Organization: Fidonet: UNIX-sysadm søger job To: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 23 Oct 97 09:06:01 grog@lemis.com wrote Re: deleted huge directory in area "freebsd-questions" g> You can ls larger directories than you can expand with *. The g> latter is limited to ARG_MAX characters, including \0 at the end g> of the strings. ARG_MAX is defined in g> /usr/include/sys/syslimits.h: g> g> #define ARG_MAX 65536 /* max bytes for an g> exec function */ g> g> At a guess, the names in the directory are an order of magnitude g> longer than that. Isn't there a limit on inodes on a disk? The SVR3 I had before I believe had a limit of 65535. Anyway, how about this: for x in {A-z} do rm $x* done or even for x in {A-z} do for y in {A-z} do rm $x$y done done Also on SVR3 I had the option on ls not to order, but use the "natural" order. Perhaps this will work, if it means ls doesn't try to sort the files. Leif Neland leifn@image.dk --- |Fidonet: Leif Neland 2:234/49 |Internet: leifn@image.dk