Matt, I think that error message is because there are too many "m*" files. I think it's possibly something to do with file handling limits. Possibly. I'd probably do this: > cd [directory with 500,000 m* files] > for FILES in `find -maxdepth 1 | grep '^./mgetty'` > do > rm -v $FILES > done
What that will do is find and remove files which begin with mgetty one by one, not as a wildcard removal. If you're feeling hesitant, I'd back up the directory first if possible. Then instead of using the line 'rm -v $FILES', do 'rm -iv $FILES'. This will give you an interactive removal which will prompt you before any removal. Later, Julian http://julianyap.com -----Original Message----- Date: Thu, 3 Nov 2005 09:23:54 -1000 From: Matt Darnell <[EMAIL PROTECTED]> Subject: [LUAU] How do you delete over 500,000 files in a directory To: LUAU <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 Aloha, We have a box with over 500,000 files in a direcotry. If I try 'rm m*' I get an error, something like 'too many arguments' I think someone else in this situation had a method of switching to another shell, bash is default. All the files start with mgetty. I would like to prserve the other files in the directory and the directories below /var/log Anyone have any ideas? Aloha, Matt
