copy, clear and keep to new data only


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers copy, clear and keep to new data only
# 1  
Old 10-04-2006
Question copy, clear and keep to new data only

I have an Ingres database logfile that grows constantly, iircp.log. It is always "attached" to the Ingres process that uses it, and I do not want to screw up the data. I have been copying it to another directory and then using vi on the original to reduce the size 34000 lines at a time. What I want is some way to copy the active file to another directory and drop the difference between the two (any new lines) back into the original file without disconnecting it.
# 2  
Old 10-09-2006
use a script in cronjob

1. write a script that copies the log file.
2. do cat >>logfile
3. test the script
4. Add entry in the cronjob


Subbu
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

Instructions to Clear Data Cache in Safari, Chrome, Firefox, Opera Browsers (Pictures)

Here are instructions to clear the data cache for four browsers, Safari, Chrome, Firefox, Opera. In these examples I'm using MacOS Mojave, but it should be similar for any OS. You can use these instructions to to clear and reload the cache if you have any issues with the Vue.js UserCP (current... (1 Reply)
Discussion started by: Neo
1 Replies

2. Shell Programming and Scripting

Copy and paste data

I need to copy from specified lines and paste the data into several other lines. XX123450008 xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x XX123451895 xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x ...... XX123452012 xx.x xx.x xx.x xx.x xx.x xx.x xx.x... (13 Replies)
Discussion started by: ncwxpanther
13 Replies

3. UNIX for Dummies Questions & Answers

Need to copy data from one position to another in file

Hi. I need to write a script that will allow me to copy data from one position in a line to another position while changing the first 2 bytes of the data to a constant. Here is an example of a line of data before and what it needs to look like after. there are about 200 lines in the file. ... (1 Reply)
Discussion started by: wlb_shore_user
1 Replies

4. Solaris

Copy data over a TB

Hi All, We are not able to grow a UFS filesystem since its size will be going over a TB and it wasn't created using -T with newfs. Hence we have decided to take the backup of all the files on another filesystem and recreate it using -T with newfs. Please recommend the most reliable... (2 Replies)
Discussion started by: vishalaswani
2 Replies

5. UNIX for Dummies Questions & Answers

how to clear data on / (root)

hello, /dev/dsk/c0t0d0s0 mounted on / it shows 95% full what steps i need to follow in order to clear data??? what files i need to clear??? thanks in advance (2 Replies)
Discussion started by: mtunganati
2 Replies

6. UNIX for Dummies Questions & Answers

Copy/Paste data in files

Hi, I want to put the following values into Variables R2=0.999863 , V2=118.870318 , D2=-178.887511 and so on. There are six values for each variable R2-R8, V2-V8 and D2-D8, total of 18 values for all the variables. Can any one help me to copy and paste all the values in their respective... (2 Replies)
Discussion started by: sullah
2 Replies

7. Solaris

Copy data from zfs datasets

I 've few data sets in my zfs pool which has been exported to the non global zones and i want to copy data on those datasets/file systems to my datasets in new pool mounted on global zone, how can i do that ? (2 Replies)
Discussion started by: fugitive
2 Replies

8. UNIX for Dummies Questions & Answers

Copy data from tape in unix

Dear sir/madam Could you tell me how to copy or get data from tape to any folder in unix? Thanks, (2 Replies)
Discussion started by: seyha_moth
2 Replies

9. AIX

db2 - copy data from one db to another

I need to take data from one database to another on the same machine. My first attempt has been using restore, but I am getting an error. Here is the command I am trying: db2 restore database prod into test I get the following error: The container is already in use. What would... (2 Replies)
Discussion started by: jyoung
2 Replies

10. UNIX for Dummies Questions & Answers

copy prod data to QA

We keep getting production files into an input directory. These files will be processed three times a day. 8:00AM 1:30PM 5:30PM file1.20041005_05303423.dat File2.200041005_14232313.dat Once the files are processed, they are archived immediately to prod/archive directory ... (1 Reply)
Discussion started by: zomboo
1 Replies
Login or Register to Ask a Question