This might work if the editor in question is indeed holding open the file. Most times this is perhaps the case but if i remember correctly some editors create a temporary file, work on this tempfile and only finally overwrite the original with the changed copy destroying the temp. In this (admittedly - probaby quite rare -) case one wouldn't see that in fuser.
I suppose there is no 100% sure method for this and using fuser is IMHO as close as it gets. But if you already know which editor(s) you want/need to deal with you could put a PID-file or some other marker somewhere and hold other processing as long as the marker remains.
Hi,
I unable to open any file using Vi editor,constantly getting the following error,
vi log.log
*** glibc detected *** malloc(): memory corruption: 0x081af510 **
uname -a
Linux sekac092 2.6.5-7.244-bigsmp #1 SMP Mon Dec 12 18:32:25 UTC 2005 i686 athlon i386 GNU/Linux
Also Note
ls... (8 Replies)
Hi all,
I have a shell script that i started editing, only in the midst of which i tried to save the changes i found that the file wasnt been provided with write/execute permissions.
I later have redone the changes and saved the file-
Just curious to know if there was any command wherein... (5 Replies)
helo
I install my product for koren language
I m uisng RHEL -4 operating system
now problem is whenever I open any file
vi filename
I got following error on the screen
E557: Cannot open termcap file
'vt100' not known. Available builtin terminals are:
builtin_ansi
... (1 Reply)
i have following query
e.g i want the VI Editor cursor at line number N instead of 0 while opening the file from unix prompt.
vi filename ??????
Can anyone help? (4 Replies)
Hi Everyone,
# cat a.txt
94,aqqc,62345907,
5,aeec,77,
# cat 1.pl
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
open(my $FA, "/root/a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\,/, $_);
if (index($tmp, "qq") ne -1) {
... (4 Replies)
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
Hi,
I would like to ask about the notepad++ text editor application, Although there are alternative and more great text editor in linux (gedit, geany, jedit) im still using the notepad++ sometimes cause for some of my own reason one of those is the minimalist text(what i mean is notepad++ has a... (2 Replies)
vi: syntax error at line 1: `)' unexpected
when I try to vi into the /etc/vfstab, the return gives me the above error.
how can resolve this so that I can have access into vi. (6 Replies)
Hi,
I am facing a problem regarding .csv file, my script does not read .csv file and if i open this file in vi editor and perform :wq option then only my script reads the .csv file.
Thanks (5 Replies)
Hello Experts,
I need to write a shell script to check if a file is open and something is being written to it. I want to know how OS handles it. I checked with lsof command but it is not working. For a test I did this.
while true; do echo `date` >>abc.txt; done
then I checked
lsof |... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies
LEARN ABOUT CENTOS
kate
KATE(1) KDE User's Manual KATE(1)NAME
kate - Advanced text editor for KDE
SYNOPSIS
kate [-s, --start name] [--startanon] [-n, --new] [-b, --block] [-p, --pid pid] [-e, --encoding name] [-l, --line line] [-c, --column
column] [-i, --stdin] [-u, --use] [KDE Generic Options] [Qt Generic Options]
DESCRIPTION
Kate is the KDE Advanced Text Editor.
Kate also provides the editor part for various applications, under the name KWrite.
Some of Kate's many features include configurable syntax highlighting for languages ranging from C and C++ to HTML to bash scripts, the
ability to create and maintain projects, a multiple document interface (MDI), and a self-contained terminal emulator.
But Kate is more than a programmer's editor. Its ability to open several files at once makes it ideal for editing UNIX(R)'s many
configuration files. This document was written in Kate.
OPTIONS -s, --start name
Start Kate with a given session.
--startanon
Start Kate with a new anonymous session, implies -n.
-n, --new
Force start of a new Kate instance (is ignored if start is used and another Kate instance already has the given session opened), forced
if no parameters and no URLs are given at all.
-b, --block
If using an already running Kate instance, block until it exits, if URLs given to open.
-p, --pid pid
Only try to reuse kate instance with this pid (is ignored if start is used and another Kate instance already has the given session
opened).
-e, --encoding name
Set encoding for the file to open
You can use this to force a file opened in utf-8 format, for instance. (The command iconv -l provides a list of encodings, which may be
helpful to you.)
-l, --line line
Navigate to this line
-c, --column column
Navigate to this column
-i, --stdin
Read the contents of stdin
-u, --use
Use an already running Kate instance; default, only for compatibility
SEE ALSO
More detailed user documentation is available from help:/kate (either enter this URL into Konqueror, or run khelpcenter help:/kate).
There is also further information available at the Kate website[1].
EXAMPLES
To open a file named source.cpp at column 15, line 25, in an existing Kate window, you could use:
kate -c 15 -l
25 -u source.cpp
If you have an active internet connection, you can take advantage of KDE's network transparency to open a file from an ftp site. If you do
not have write permission on the remote server, the file will be opened read only and you will be prompted for a local filename to save to
if you make changes. If you do have write permission, changes will be saved transparently over the network.
kate ftp://ftp.kde.org/pub/kde/README
AUTHORS
The maintainer of Kate is Christoph Cullmann<cullmann@kde.org>. A comprehensive list of authors and contributors is available in the
complete user manual mentioned above.
AUTHOR
Lauri Watts <lauri@kde.org>
Author.
NOTES
1. the Kate website
http://kate-editor.org/
K Desktop Environment 2010-10-06 KATE(1)