Hello ,
I got this script that read directories, create a zip file with the date of the file, and put all files in that date inside Zip:
dir=/iscsi/webserver231/; for subdir in "$dir"/*/; do find "$subdir" -type f -name 'ex??????.log' -exec bash -c 'for f; do f=${f##*/ex}; echo "${f%??.log}"; done' - {} + | sort -u | while read date; do find "$subdir" -type f -name "ex${date}??.log" -exec zip -m "${subdir}/${date}.zip" {} +; done; done
This script is made to logfile name "exyymmdd.log" , now i got "www.xxxxxxx.pt-access_log.09-03-30" and the script dont work, thats logic :)
I tried to modify it but with no success , pls help
Best regards