How do you clean up a Linux directory with a large size / number of files?
I have a directoy on linux which has several hundred thousand files and is about 100 Gb. I tried to clear the directory using 'rm -f *' and got the following error:
>rm -f *
-ksh: rm: /bin/rm: cannot execute [Argument list too long]
I am getting the same error when I try to find the find command. I can delete individual files and groups if I can get a small enough expression, but it can take days to clear them all. Does anyone know of any better ways to empty a large directory?
+3
source to share