Quote:
Originally Posted by slufoot80
when I get to the end of the month it will put the last file dated 10/31 in the "/Nov" directory.
|
Because
Code:
eval echo "20`date +%y`/`date +%b`"
results in "2011/Nov" at time of this logrotate scripts execution?
Quote:
Originally Posted by slufoot80
do I run "scp" out of the brackets in a global setting or do I keep them in there for a local setting
|
If the action is local to these log files only keep it here, OTOH
Quote:
Originally Posted by slufoot80
Code:
prerotate
scp /frank/*.gz root@192.168.1.20:/frank/20`date +%y`/`date +%b`
endscript
|
...why should you do this in the first place? You don't have to scp as root because Rsyslogd has templates for logs. So if you can install it on 192.168.1.20 then you can send /var/log/messages there and process it further as you like. And BTW,
Code:
20`date +%y`/`date +%b`
can be written as