Summary: probably over a million files to delete
From: Gold Sun (goldsun8_at_yahoo.com.sg)
Date: 08/27/05
- Previous message: Chia-Ming: "Some errors"
- In reply to: William Kwan: "Summary: find and no NFS"
- Next in thread: Gold Sun: "Summary: mailx mails not sent out or not arriving?"
- Reply: Gold Sun: "Summary: mailx mails not sent out or not arriving?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 27 Aug 2005 20:09:52 +0800 (CST) To: sunmanagers@sunmanagers.org
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
unmounting
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
directory
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
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Previous message: Chia-Ming: "Some errors"
- In reply to: William Kwan: "Summary: find and no NFS"
- Next in thread: Gold Sun: "Summary: mailx mails not sent out or not arriving?"
- Reply: Gold Sun: "Summary: mailx mails not sent out or not arriving?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|