Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

run find command under this directory only

Roger PeiAug 13 2020 — edited Aug 17 2020

Is there any issue with the command as below?

#XYZ_LOGS=/var/log/xyz

#find $XYZ_LOGS -xdev -type f ! -name '*gz' -xtime +1 -exec gzip -q "{}" \;

I wanted  to gzip all files in daily basis under /var/log/xyz only. Then after that, I am going to in-place it into cron.

Thank you for your help!

Comments
Post Details
Added on Aug 13 2020
7 comments
380 views