find file and execute gzip command


#1 Sajeshvv23 (Last updated )

Hi,

i am using CE edition and looking for a setup which will find ceertain files and zip it using gzip. the below command runs successfully on CLI,

"find /home/syslog_admin/*.log -daystart -mtime +0 -print -exec gzip -f {} \;

how do run execute the above using nxlog.conf?

exec_async("/usr/bin/gzip", "/home/syslog_admin/*.log"  -daystart -mtime +0 -print -exec "/usr/bin/gzip -f {} \; but not working.

aslo tried below but no luck,

 

 exec_async("/usr/bin/find", "/home/syslog_admin/*.log","-daystart", "-mtime", "+0", "-print", "-exec", "/usr/bin/gzip", "-f", "{}", "\;");