Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dev Null Help!!

Status
Not open for further replies.

joet7878

Programmer
Aug 16, 2001
10
AU
trying to write a script which sends a dev null to a file so that it removes contents and then writes it to a dated temp file;

EX File is A.log ,
Temp file will = A12_03_03_TEMP.log

The problem I have is that , lets say the log is 5 meg , after the dev null it is emptied but remains at 5 meg !! Going insane can anyone help. I cant do a close rename and open as a new file because this affects the writer of the log (shuts it down!!) so im in big confusion territory...?

EX SCRIPT


Thanks in advance JT
 
Why not just use > to (re)create the file
eg.
> A.log


HTH Dickie Bird (:)-)))
 
Hi Dickie,

That doesnt seem to work because the file is still open and when it does a save it saves everything that was lost on the > command.
So basically I need to zero it and start it as its working
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top