matze77 has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks!
The Situation:
We got a Linux System with an old NT-Basic application that writes a Logfile (a simple text file) to a given path.
My task ;-) is now to
a) "rotate" that logfile (its small so i could store a week or more till overwriting the first log) and
b) copy the logfile to a samba share on the same machine where it should be
c)copied (this could be a windows machine?) to a NAS share
from which it could be accessed by some people (the bosses)
My Problem:
The Linux box is a SUSE 8.2 with Perl 5.8 and no cpan (I am not allowed to change that)
cause of compatibility issues with the systems and maybe the archive program which relies on the give Perl version.
The windows system i could change so maybe if it is best done with usage of modules i could do it here?
(SSH and ftp-access is possible so win-scp or simular tools could be used).
Maybe you got a hint in which direction i should try to develop a solution?
Update: No Perl code i am afraid:
As i figured out the logfile is only produced during the daily backup job which is scheduled at night, so i solved it for the moment as i put a simple copy (shell #!/bin/sh) job in crontab which moves the file to the samba share.
hint: crontab -e is different from /etc/crontab the sixth colon is not the username it starts with the command directly
Update/etc/crontab #min hour day month dow(day of week) user command 40 22 * * * root /usr/local/sbin/cplogb #users crontab (edit with crontab -e)the same thing without the userna +me in front of the command: 40 22 * * * /usr/local/sbin/cplogb
|
|---|