Anders Johansson wrote:
On Monday 12 October 2009 21:42:39 Dean Hilkewich wrote:
What we want to do is to run a script that will unrar those files on Tuesday, Thursday and Saturday. The cron part I know how to do. We would like the extracted data to fall into the clients root directory example and then delete the Monday/Wed/Friday folders:
/backup/client1/010109.db /backup/client1/010309.db /backup/client1/010509.db /backup/client2/010109.db /backup/client2/010309.db /backup/client2/010509.db
You mean something like
for clientdir in /backup/*; do cd $clientdir for daydir in $clientdir/*; do unrar $daydir/*.rar rm -rf $daydir done done
perhaps?
Anders
Ya something like that. Anyway of making check to see if the unrar was found and successfully extracted before deleting the daydirs? Also I notice that some of the older clients that are using the DOS based version have their rar's first file as .r01 instead of .rar (older rar version would be the reason for the extension difference I would guess). Thanks for the help btw. Dean -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org