in reply to Archiving Files

the program is slow and tar process is taking more than half day to complete
Have you determined which part of your program is slow, the actual writing of the tar archive or finding the files first? How do you populate your @srcfiles array? In a directory with 300,000 files it could be that just finding the files over a week old is taking a long time.

I know that this may not be possible but could the system that writes these files be easily altered to write the files into sub-directories? These could be named for a time period, maybe for a day or even for an hour if the file volumes are huge, e.g /dest/dir/2006-12-11 or /dest/dir/2006-12-11.09. Doing this would make administering these files much easier.

I hope these thoughts are of use.

Cheers,

JohnGG