Re: Problem with vi editor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Are you running vi or vim on both systems? (ls -l `which vi`)
We use vim om Red Hat.  When you save your edit, it actually creates a
new file (ls -li).
Your program probably uses a file handle pointing to the old inode.

If you only want to look at the content of the file, use "tail -f" as
Vivek already suggested.  Alternatively, you can use vi in read-only
mode (vi -R or view).

If you really want to change the log file while the program is still
running, you could use tools such as sed which don't rewrite the file.

Kind regards,

Herta


On 17/04/07, Vivek Gite <vivek@xxxxxxxxxxxx> wrote:
Try tail -f /var/log/trace.log

May be some kernel issue but i'm not sure...


On 4/17/07, Ravi R.S <raviraj@xxxxxxxxxx> wrote:
>
> Hi,
> I have an C++ application running on my linux machine. This application
> logs
> all the information to a log file named trace.log. When I open this
> trace.log with vi editor(redhat linux kernel 2.6) and save during when the
> application is running and edit it, the application stops logging to the
> file no more logs are logged into the trace.log file even the application
> is
> running. Why this behaviour?
>
> But this is not the case in the Debian linux. Even after editing the log
> file, it still continues to log after saving it.
>
> Can somebody give pointers on this. Your comments will be appriciated.
>
> Regds,
> Rav
> SASKEN BUSINESS DISCLAIMER
> -------------------------
> This message may contain confidential, proprietary or legally privileged
> information. In
> case you are not the original intended Recipient of the message, you must
> not, directly or
> indirectly, use, Disclose, distribute, print, or copy any part of this
> message and you are
> requested to delete it and inform the sender. Any views expressed in this
> message are
> those of the individual sender unless otherwise stated. Nothing contained
> in this message
> shall be construed as an offer or acceptance of any offer by Sasken
> Communication
> Technologies Limited ("Sasken") unless sent with that express intent and
> with due
> authority of Sasken. Sasken has taken enough precautions to prevent the
> spread of
> viruses. However the company accepts no liability for any damage caused by
> any virus
> transmitted by this email
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
Herta Van den Eynde -=- 51°09'08" N 004°28'10" E

"Life on Earth may be expensive,
but it comes with a free ride around the Sun."

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux