01-27-2009
updates only
Hi,
I have a file called Data-today.Txt that is updated every 5 minutes.
# cat '/root/Desktop/window/'`date +%b%Y`'/Data-'`date +%d%m%y`'.Txt' > /root/temp.txt
I want to read it every hour and findout the changes and process only those lines added since the last check.
I tried diff but did not get what I want.
At 9:56 A. M. the file looked:
This is line one
This is line two
At 10:00 A. M. I processed these two lines.
At 10:05 A. M. the original file will look like:
This is line one
This is line two
This is line three
at 11:00 A. M. I want to process only the newly added line i.e.
This is line three
Any help will be appreciated.
Regards,
Shantanu Oak
7 More Discussions You Might Find Interesting
1. AIX
I have a Unix based server running Sagitta and the server is giving me an error of 4b10004 and my research tells me this is an EPROM issue, which means the processor needs to be flashed or repaired. Once up and running where can I go to get updates for Unix? (1 Reply)
Discussion started by: crainer
1 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I would like to perform multiple updates within a single database open and close.
Box: solaris
dB: informix
This is how i do perform for single update
dbaccess <dbname> -<<EOF
update table1 set col1=1 where col2=1
EOF
i have the col1 values in a file (some 1000 values)... (1 Reply)
Discussion started by: matrixmadhan
1 Replies
3. Red Hat
All,
I'm updating my redhat servers by directly connecting to internet (redhat network). After I connecting to the internet, I see some packages in package updater.I'm trying to do update but its stucking up when it is starting updating the server. Any ideas. Thanks (4 Replies)
Discussion started by: s_linux
4 Replies
4. UNIX for Dummies Questions & Answers
hello all
I Installed CenTOS 5.5 and i've Run yum update command
every thing went smoothly but i got the following error at the end
6:kdebase-3.5.4-21.el5.centos.1.i386: Insufficient space in download directory /var/cache/yum/updates/packages
* free 6.0 M
* needed 28 M
... (2 Replies)
Discussion started by: abu_shiahb
2 Replies
5. Fedora
Hi,
Im using Fedora version 23 (latest upgrade and upates). Currently to receive the updates, I use:
su -c 'yum update'
This works fine, but I get:
yum command has been deprecated, redirecting to '/usr/bin/dnf update'.
See 'man dnf' and 'man yum2dnf' for more information.
To... (1 Reply)
Discussion started by: Janning
1 Replies
6. Shell Programming and Scripting
This cmd will update the user's crontab with the quoted line.
But how to script the update using a previously stored variable?
crontab -l | awk '{print} END {print "* * * * * echo test >> /tmp/testing"}' | crontab
crontab -l | awk '{print} END {print "$storedvariable"}' | crontab
Does not... (3 Replies)
Discussion started by: gtsonoma
3 Replies
7. HP-UX
On Hp-ux,I'm not talking about security patches.But free products like SecureShell.
How to know if update is avaliable?On Solaris11 is possible using pkg update.
On hpux?Some tool to check for outdated products and tell if new version is avaliable?
---------- Post updated at 03:24 AM... (1 Reply)
Discussion started by: Linusolaradm1
1 Replies
cmx(8) System Manager's Manual cmx(8)
Name
cmx - generic communication exerciser
Syntax
/usr/field/cmx [ -h ] [ -ofile ] [ -tn ] -l line-1 ...
Description
The exerciser will write, read, and validate random data and packet lengths on a given communications line. The line under test must have
a loopback connector attached to the distribution panel or the cable and the line must be disabled in the file and a non-modem line. That
is, the flag must be set to off.
The exerciser runs until or kill -15 pid is sent to the process.
A logfile is made in for you to examine and then remove. If there are errors listed in the logfile, make sure that you check the file,
because that is where the driver and kernel error messages are saved.
You must specify the -l flag followed by the lines to test. The line-n arguments identify the lines to be tested. A maximum of 32 lines
can be tested at any one time. The line-n arguments are specified as names taken from the directory without the letters ``tty''. For
example, if the directory lists tty03, the line argument is 03.
The DEVICES section lists the devices that can be tested.
Restrictions
If there is a need to run a system exerciser over an NFS link or on a diskless system there are some restrictions. For exercisers that
need to write into a file system, such as the target file system must be writable by root. Also the directory, in which any of the exer-
cisers are executed, must be writable by root because temporary files are written into the current directory. These latter restrictions
are sometimes difficult to overcome because often NFS file systems are mounted in a way that prevents root from writing into them. Some of
the restrictions may be overcome by copying the exerciser to another directory and then executing it.
Options
-h Prints help message about this command.
-ofile Save output diagnostics in file.
-tn Run time in minutes (n). The default is to run until a or kill -15 pid is sent to the process.
Restrictions
Pseudo devices (those whose first character after tty is p, q, r, s, t, u) cannot be tested. Neither can lta devices with major #39.
Devices
Use the command on to find out which tty line corresponds to a device line number.
Examples
The following example runs the exerciser for 60 minutes on lines 00, 13, 22, and 32.
% /usr/field/cmx -t60 -l 00 13 22 32
The following example runs the exerciser on lines 11, 42, 45, and 76 in the background until interrupted by a or kill -15 pid.
% /usr/field/cmx -l 11 42 45 76 &
See Also
Guide to System Exercisers
cmx(8)