Sponsored Content
Top Forums UNIX for Dummies Questions & Answers "vi"-ing a constantly updated file Post 302115525 by Percy on Wednesday 25th of April 2007 09:47:13 AM
Old 04-25-2007
"vi"-ing a constantly updated file

Hi,

A bit of a dumb question here. Sorry folks.

Suppose I have this file which is being updated at irregular intervals (a few seconds, a few minutes, who knows) by a background process.

I 'vi' this file with the intention of editing it, so it opens up a temp copy as the usual /tmp/720cwhatever

Now suppose, whilst I have this file opened, its updated several times by the background process.

I make my changes, save-quit.

What happens to the updates that were made by the background process during the time I had the file opened?


How do I mitigate this?
(unfortunately, stopping the background process is not an option).


The file is fairly big also (about 40Mb) so it takes vi a few seconds to load it up, save to it etc.....


Unix is ksh.
OS is SunOS.

Hope you guys can help! - thanks in advance!
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

Ignore "a line" within /etc/profile only when su'ing

Is there a way to ignore a command within /etc/profile only when su'ing as any particular user. For instance.... As root, if I run "su - oracle -c program" it is running a string in my profile called "echo "^2;$(hostname)-(ABC) @ $(who am i)^G". I don't want the above string to run if I... (9 Replies)
Discussion started by: lwif
9 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

finding the strings beween 2 characters "/" & "/" in .txt file

Hi all. I have a .txt file that I need to sort it My file is like: 1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO) 2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies

5. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

6. Shell Programming and Scripting

Permission error when "touch"ing file with different user

Hi, There are 2 users (T886072 & T864764) that need to be provided full (rwx) access to a directory. I made the changes to the directory permissions using chmod and setfacl : root@digidb2:# chmod 700 /u02/ftpfiles/MFRS16/discount_rates/ root@digidb2:# setfacl -s... (3 Replies)
Discussion started by: anaigini45
3 Replies

7. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
TIME_SECOND(9)						   BSD Kernel Developer's Manual					    TIME_SECOND(9)

NAME
time_second, time_uptime, boottime -- system time variables SYNOPSIS
#include <sys/time.h> extern time_t time_second; extern time_t time_uptime; #include <sys/kernel.h> extern struct timeval boottime; DESCRIPTION
The time_second variable is the system's ``wall time'' clock. It is set at boot by inittodr(9), and is updated periodically via timecounter(9) framework, and also updated by the settimeofday(2) system call. The time_uptime variable is a monotonically increasing system clock. It is set at boot, and is updated periodically. (It is not updated by settimeofday(2).) The boottime variable holds the system boot time. It is set at system boot, and is updated when the system time is adjusted with settimeofday(2). The variable may be read and written without special precautions. All of these variables contain times expressed in seconds and microseconds since midnight (0 hour), January 1, 1970. The bintime(9), getbintime(9), microtime(9), getmicrotime(9), nanotime(9), and getnanotime(9) functions can be used to get the current time more accurately and in an atomic manner. Similarly, the binuptime(9), getbinuptime(9), microuptime(9), getmicrouptime(9), nanouptime(9), and getnanouptime(9) functions can be used to get the time elapsed since boot more accurately and in an atomic manner. SEE ALSO
clock_settime(2), ntp_adjtime(2), timeval(3), hardclock(9), hz(9) BSD
March 13, 2008 BSD
All times are GMT -4. The time now is 09:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy