Tux's lil' helper
Joined: 06 Sep 2002
|Posted: Wed Mar 05, 2008 2:04 am Post subject: Reading Multiple Text FIles Help! (SOLVED)
|Everyone is entitled to a case of the dumbazz and now was my turn. Here is my dilemma..
On my email server I had a cron job that changed to a directory and deleted certain files
greater than seven days old. Well I decided to do some modifications to my email server
and I removed the directory and changed the way that my email functions. Well for some
reason I forgot about the cron job and when it ran, it couldn't find the directory so it decided
to perform the next step and delete all of my files in my home folder. I had things backed up
to my backup email server but unfortunately it happened there also.
I rebuilt my reiserfs partition and was able to recover about 117,000+ files with the naming
convention of 10000_10000, etc.. What I need to do is go through each file and if it contains
a certain word or words, like my email address, move that file to another folder. Once it is
done then it will loop and read the next file. I have a listing of all of the files in a text file.
Once it is finished, I can delete the remaining files.
Can anyone show me how to do this?
Last edited by eusanpe on Wed Mar 05, 2008 2:53 am; edited 1 time in total