I want to purge the log files, .gz files, which are 7 days older or more.
This is the line I execute to do the job.
/usr/bin/find /var/log/active/*gz -mtime +7 -exec /usr/bin/rm {} \; > /dev/null 2>&1
But it returns with the following error:
bash: /usr/bin/find: The parameter or environment lists are too long.
Please help me out to correct the problem and correct syntax in the script.
thanks
This is the line I execute to do the job.
/usr/bin/find /var/log/active/*gz -mtime +7 -exec /usr/bin/rm {} \; > /dev/null 2>&1
But it returns with the following error:
bash: /usr/bin/find: The parameter or environment lists are too long.
Please help me out to correct the problem and correct syntax in the script.
thanks