Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 1997 02:18:11 -0500 (CDT)
From:      "Matthew D. Fuller" <fullermd@futuresouth.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        Shawn Ramsey <shawn@luke.cpl.net>, questions@FreeBSD.ORG
Subject:   Re: deleted huge directory
Message-ID:  <Pine.BSF.3.96.971023020754.29151F-100000@shell.futuresouth.com>
In-Reply-To: <19971023163601.11925@lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <blah>' 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          |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971023020754.29151F-100000>