Xref: utzoo comp.unix.wizards:15798 comp.unix.questions:13110 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!ames!lll-winken!uunet!amgraf!brian386!news From: news@brian386.UUCP (Wm. Brian McCane) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: unix question: files per directory Message-ID: <432@brian386.UUCP> Date: 27 Apr 89 04:47:28 GMT References: <24110@beta.lanl.gov> <4822@macom1.UUCP> <776@helios.toronto.edu> Reply-To: news@brian386.UUCP (Wm. Brian McCane) Distribution: na Organization: Harmon Electronics, Inc Grain Valley, MO Lines: 46 In article <776@helios.toronto.edu> sysruth@helios.physics.utoronto.ca (Ruth Milner) writes: >In article <4822@macom1.UUCP> rikki@macom1.UUCP (R. L. Welsh) writes: =>From article <24110@beta.lanl.gov>, by dxxb@beta.lanl.gov (David W. Barts): ==> ==> How many files can there be in a single UNIX directory => =>You will undoubtedly run out of inodes before you reach any theoretical =>limit. > >Another thing you may run into is that some UNIX utilities seem to store >the names of all of the files somewhere before they do anything with them, >and if there are a lot of files in the directory, you won't be able to >run the utility on all of them at once. (This won't prevent you from creating >them, though). In particular I am thinking of "rm". When cleaning up after >installing the NAG library, I tried to "rm *" in the source code directory. >It refused (I think the error was "too many files"). I had to go through and >"rm a*", "rm b*" etc. until it was down to a level that rm would accept. I > >Does anyone know: > 1. why "rm" does it this way, and > 2. are there other utilities similarly affected? > > Ruth Milner UUCP - {uunet,pyramid}!utai!helios.physics!sysruth You didn't actually run into a "rm" bug/feature, you hit a shell FEECHER. The shell expands for the regexp, and then passes the generated list to the exec'd command as the arguments. "rm" can only handle a limited number of files, (or it may be the shell will only pass a limited number, who knows, its a FEECHER after all ;-), so rm then gave the error message of too many filenames. I would like it if "rm" were similar to most other commands, ie. you could rm "*", preventing the expansion of the * to all file names until "rm" got it, but it returns the message "rm: * non-existent" on my machine, Sys5r3.0. brian (HMmmm. That new version of "rm" I mentioned sounded kinda useful, I wonder if anyone out there has 1 already?? HINT ;-) -- Wm. Brian McCane | Life is full of doors that won't open | when you knock, equally spaced amid Disclaimer: I don't think they even | those that open when you don't want admit I work here. | them to. - Roger Zelazny "Blood of Amber"