Xref: utzoo comp.unix.wizards:15618 comp.unix.questions:12941 Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: unix question: files per directory Message-ID: <8253@chinet.chi.il.us> Date: 20 Apr 89 16:34:40 GMT References: <24110@beta.lanl.gov> <4822@macom1.UUCP> <776@helios.toronto.edu> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Followup-To: comp.unix.wizards Distribution: na Organization: Chinet - Public Access Unix Lines: 20 In article <776@helios.toronto.edu> sysruth@helios.physics.utoronto.ca (Ruth Milner) writes: [ rm * fails with large number of files..] >Does anyone know: > 1. why "rm" does it this way, and > 2. are there other utilities similarly affected? Actually the shell expands the * and can't pass the resulting list to rm because there is a fixed limit to command line arguments. All programs would be affected in the same way, except those where you quote the wildcard to prevent shell expansion (find -name '*' would be the common case, and the -exec operator can be used to operate on each file, or if you have xargs you can -print |xargs command). However, if your version of unix doesn't automatically compress directories (SysV doesn't) you should rm -r the whole directory or the empty entries will continue to waste space. Les Mikesell