The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remove first N bytes and last N bytes from a binary file on AIX. naveendronavall Shell Programming and Scripting 1 05-24-2008 12:06 PM
file size in bytes is different in ftp and local pc umen UNIX for Dummies Questions & Answers 2 06-04-2007 05:58 PM
delete bytes from file Loriel Shell Programming and Scripting 6 04-13-2006 02:27 PM
Rearrange bytes within a txt file yankee428 UNIX for Dummies Questions & Answers 4 06-16-2005 02:55 PM
Tape Reset????? rrivas UNIX for Dummies Questions & Answers 1 09-13-2002 07:39 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-06-2001
JackieRyan26 JackieRyan26 is offline
Registered User
  
 

Join Date: Sep 2001
Location: Johnston, Iowa
Posts: 7
Unhappy Take a file from the system and put on tape and reset the file to 0 bytes

I did this the other day but one of my support personnel removed my history so i could call it back up to remeber the exact command since i am air-headed at times. I am trying to take a 30 MEG file off the system and drop it to tape then i want to make the file go back to being 0 bytes so the system can start writing a new file. I am running a running HP Unix 11.0 and it is on a L-2000 class system. Please can anyone answer this scenerio the less keystrokes the happier i will be!! Thanks

Last edited by JackieRyan26; 09-06-2001 at 02:31 PM..
  #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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:34 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0