Hi,
Been searching the forum, but can't seem to find the right answer i'm looking ofr...
Basically I need to remove all the log files from a folder, compress them and move them to another folder..
I've come up with this:
which seems to work, but I've been told I should use a tar command as my approach isn't very efficient. Very new to unix, so not sure what to do..
Can anyone help.?
Been searching the forum, but can't seem to find the right answer i'm looking ofr...
Basically I need to remove all the log files from a folder, compress them and move them to another folder..
I've come up with this:
Code:
gzip -r $LOG_PATH_STR_PARM
cp $LOG_PATH_STR_PARM/*.gz $LOG_PATH_STR_PARM/archive
rm -f /gcdm/dev/scripts/regulatory_reporting/mcmi/logs/*.gz
Can anyone help.?