From owner-freebsd-questions Thu Oct 23 00:18:37 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA05169 for questions-outgoing; Thu, 23 Oct 1997 00:18:37 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from shell.futuresouth.com (shell.futuresouth.com [207.141.254.20]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA05161 for ; Thu, 23 Oct 1997 00:18:33 -0700 (PDT) (envelope-from fullermd@futuresouth.com) Received: from shell.futuresouth.com (mail.futuresouth.com [207.141.254.21]) by shell.futuresouth.com (8.8.5/8.8.5) with SMTP id CAA04458; Thu, 23 Oct 1997 02:18:11 -0500 (CDT) Date: Thu, 23 Oct 1997 02:18:11 -0500 (CDT) From: "Matthew D. Fuller" Reply-To: "Matthew D. Fuller" To: Greg Lehey cc: Shawn Ramsey , questions@FreeBSD.ORG Subject: Re: deleted huge directory In-Reply-To: <19971023163601.11925@lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, 23 Oct 1997, Greg Lehey wrote: > On Thu, Oct 23, 1997 at 01:16:35AM -0500, Matthew D. Fuller wrote: > > Don't know if this helps, but the reason I suggested echo'ing * (all > > files, of course) into a file is to see if you could do this: > > rm 'cat /place/some/file/list' > > or something similar; I'm not exactly an expert when it comes to piping > > stuff from a file. > > Someone else? Can this be done, and could it work? > > You can ls larger directories than you can expand with *. The latter > is limited to ARG_MAX characters, including \0 at the end of the > strings. ARG_MAX is defined in /usr/include/sys/syslimits.h: > > #define ARG_MAX 65536 /* max bytes for an exec function */ > > At a guess, the names in the directory are an order of magnitude > longer than that. Aha. I think that, at some level, I knew there was a limit like that. In that case, you're going to have some trouble. Maybe do a series of ls's or echo's, echoing a* > file1, b* > file2, etc, depending on what the files are named. If an echo * can't work, I'd guess an rm * wouldn't either. You'll have to find some way to piecemeal this up ( I would say info files that contain the dir list; my pet project of the night) and rm 'cat ' for however many files you have. I think someone will have to give a hint what's in there as far as file names are concerned. The only news server I have access to doesn't have a directory like that there. > > Greg > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* | FreeBSD; the way computers were meant to be | * "The only reason I'm burning my candle at both ends, is * | that I haven't figured out how to light the middle yet."| * fullermd@futuresouth.com :-} MAtthew Fuller * | http://keystone.westminster.edu/~fullermd | *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*