On Monday 12 October 2009 22:00:51 Dean Hilkewich wrote:
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.
Hm, ok, something like this then for clientdir in /backup/*; do cd $clientdir for daydir in $clientdir/*; do rarfile=$daydir/*.rar if [ ! -e $rarfile ]; then rarfile=$daydir/*.r01 fi unrar x $rarfile [ $? -eq 0 ] && rm -rf $daydir done done Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org