From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Mon, 24 Mar 2003 05:00:37 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 81 ************************************************** Sunday 23 March 2003 Number 81 ************************************************** Subjects for today 1 FYI - Truncating logs. : Dave Saville" 2 Re: FYI - Truncating logs. : Steven Levine" 3 Re: FYI - Truncating logs. : Sebastian Wittmeier (ShadoW)" **= Email 1 ==========================** Date: Mon, 24 Mar 2003 08:26:40 +0000 (GMT) From: "Dave Saville" Subject: FYI - Truncating logs. I have found out that it would appear to be OK on OS/2 to do the cat some log Unix trick to truncate an open log. Unfortunately the cmd shell allows >nul but not log and given it a ^D and it seems OK on the log files of various programs I have tested. Of course I have no idea if those programs keep the file open all the time or just when writing. I think I will put an empty file called /dev/null on all drives and then look at adapting log cycling scripts from my Unix box. I have a great one that you tell a) how many logs to keep and b) how many of those should be compressed. So you could keep the last two days readily readable and the rest zipped. -- Regards Dave Saville **= Email 2 ==========================** Date: Mon, 24 Mar 2003 08:53:08 -0800 From: "Steven Levine" Subject: Re: FYI - Truncating logs. In <20030324082916.GKSX310.mta05-svc.ntlworld.com at pooh>, on 03/24/03 at 08:26 AM, "Dave Saville" said: >I have found out that it would appear to be OK on OS/2 to do the cat >some log Unix trick to truncate an open log. >Unfortunately the cmd shell allows >nul but not the command line with cat - >log and given it a ^D and it seems OK on the What shell are you using? Some OS/2 shells are more brain dead than others. With 4OS2: [d:\tmp\00instal]cat - tmp.txt [d:\tmp\00instal]cat tmp.txt [d:\tmp\00instal] Same for ksh. Steven -- --------------------------------------------------------------------- "Steven Levine" MR2/ICE 2.35 #10183 Warp4/FP15/14.085_W4 www.scoug.com irc.webbnet.org #scoug (Wed 7pm PST) --------------------------------------------------------------------- **= Email 3 ==========================** Date: Mon, 24 Mar 2003 14:04:00 +0100 (CET) From: "Sebastian Wittmeier (ShadoW)" Subject: Re: FYI - Truncating logs. On Mon, 24 Mar 2003 08:26:40 +0000 (GMT), Dave Saville wrote: >I have found out that it would appear to be OK on OS/2 to do the cat >some log Unix trick to truncate an open log. OS/2 handles open files differently than Unix operating systems (e.g. you can't delete them). Thus I'm amazed that your ^D trick works the same way. Would you mind explaining the matter for interest? Sebastian