Summary: probably over a million files to delete

From: Gold Sun <>
Date: Sat Aug 27 2005 - 08:09:52 EDT
Thanks all.
Some of the replies :
A couple replies say I will still some time to complete the
 deletion, so I probably can do
 "nohup <delete command>  &
to let it run by itself in the background.
As I need to remove files older than 180 days, I chose :
cd <dir where files exist>
find . -xdev -type f -mtime +180 -exec rm {} \+ &

Other replies :
Mount the filesystem with logging on. You can do this without 
the filesystem
mount -o remout,logging <dev> >filesystem>
cd <directory>
find . -name '*2004*12' -o -name '*2004*11*' -o .... | xargs rm -f &
1. find . -exec rm {} \;
2. for x in `ls`; do rm $x ; done

You ran into a limitation on the ability of the shell.  I have run into
similar problems in the past.  Here is how I worked around it.  It
requires the use of perl.  It will remove all files within the 
where executed.  Test to verify for yourself how it works.
  ls | perl -ne 'chomp; unlink'


Meet your soulmate!
 Yahoo! Asia presents Meetic - where millions of singles gather 
sunmanagers mailing list
Received on Sat Aug 27 08:10:32 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:51 EST