









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Linus would call it "bad taste".
On Wed, 2004-06-09 at 09:07, Tim Emerick wrote:
...
> I would like a real log of the entire session as if I was at a terminal typing
> everything in.
...
If you add '-x' after the /bin/sh at the start of your shell script,
like this:
#!/bin/sh -x
each line in the script will be echoed (and prefixed by a '+'), before
being executed. Together with your redirection, this might create the
kind of complete log you are looking for.
A couple of comments about that cron command:
"/root/bin/backup > /backup/backup.log &"
- there's not much need for the ampersand at the end, it only serves to
background a process, no need to do that for a cronjob.
- what you might want there instead is "2>&1" which will redirect error
messages to your logfile as well.
-Ed
|
|