On 09:57 23 Jul 2003, Kent Borg <[EMAIL PROTECTED]> wrote:
| On Tue, Jul 22, 2003 at 06:41:54PM -0400, System Administrator wrote:
| > I am assumong that you use something on the order of
| > dumpcommandline  > /var/log/backup
| > If so - change to dumpcommandline  >> /var/log/backup
| > 
| > the >> appends rather than writing to the file.
[...]
| No, don't use cat.  It will work part of the time, but if two
| processes try to log something at the same time things will get
| garbled or lost or I'm-not-sure.

Garbled, maybe. Lost, no. >> guarentees all writes append, and thus
don't overlap.

But probably his backup runs don't overlap, and that logfile looks specific
to his backups, so there should be no multiple-writer issues.

| Use logger (for shell access) or
| syslog(3) (for C access).
| 
| For example, I just did this:
|   # logger this was written with logger and my term is $TERM

Logger is great so single line syslog messages.
He's copying a whole command multiline output to a special log.
Logger is not the tool.

| -kb, the Kent who didn't know about logger until now, but he knew
| simple redirection was a bad idea and started looking through a couple
| man pages.

- cs, who also hadn't looked at logger, but now sees many users for it.
Thanks:-)

Cheers,
-- 
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/

An unbreakable toy is useful for breaking other toys.   - Van Roy


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to