Hi guys,
I am trying to create a shell script/command that find error_log files created by PHP, check their file sizes and remove them if over a certain size.
I have only gotten as far as printing the files and file sizes with the code below
for i in `locate -r 'error_log$'`;do echo "$i|" `stat -c %s $i`;done
Can anyone help?
Thanks in advance!