home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] Linus would call it "bad taste".



Ed, Thanks for that -x tip.  I'm going to incorporate it right away.  

The reason I used the ampersand with the cron entry is that on occasion I
might manually run the cron command via webmin.  Webmin will echo everything
to the browser and will kill the job if I close the browser window before the
job is done.


--- Ed Brown <ebrown@lanl.gov> wrote:
> 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
> 
> _______________________________________________
> NMLUG mailing list
> NMLUG@nmlug.org
> http://www.nmlug.org/mailman/listinfo/nmlug



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 



Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache