The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-06-2001
rwb1959's Avatar
rwb1959 rwb1959 is offline
Registered User
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
You should probably write a script to do this
but assuming you have just user tar (or somthing
like that) to get the file on the tape, upon
successful completion, you could simply do:

> some_file.log

...this will effectively truncate some_file.log
I suggest a shell so that you can check the
exit code for the tar command then based on
success or failure, the script could then
choose to truncate the file or perhaps send
you an email notifcation of the problem.