Date: 23 Oct 97 15:09:22 +0100 From: leifn@swimsuit.roskildebc.dk (Leif Neland) To: freebsd-questions@freebsd.org Subject: Re: deleted huge directory Message-ID: <211_9710240107@swimsuit.roskildebc.dk> References: <Pine.BSF.3.95.971022231126.26455B-100000@luke.cpl.net> <Pine.BSF.3.96.971023011454.29151C-100000@shell.futuresouth.com> <19971023163601.11925@lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?211_9710240107>