[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Files in use ...
From: Michael Reiher <michael.reiher () gmx ! de>
Date: 1999-02-06 22:48:44
[Download RAW message or body]
weis@stud.uni-frankfurt.de wrote:
>
> Hi,
>
> is there any way to find out wether one file is currently in
> the process of being written ?
>
> KFMIII could then show an animated icon perhaps :-)
> Then people can see which files are currently being downloaded
> from the Web. Sometimes I want to delete files which Netscape
> if currently downloading. Some special icon could tell me:
> This file is opened for writing ...
Today while upgrading my system to SuSE 6.0 I stumbled over a little
Unix tool which seems to do exactly what you want. Itīs called lsof and
it lists open files. It seems quite promising. I included the
introduction of the man page for more information.
But there are also might come up some problems. It has for instance no
real license but you may use the code as long as you mention the
original authors if I understand it right. The other thing is that it
seems to work quite close at the kernel level. So it could cause many
problems(the faq file is quite long:)
So maybe just take a look at it.
Ah right, you can get it at vic.cc.prudue.edu/pub/tools/unix/lsof
DESCRIPTION
Lsof revision 4.38 lists information about files opened by
processes for the following UNIX dialects:
AIX 4.1.[45], 4.2[.1], and 4.3[.1]
BSDI BSD/OS 2.1 and 3.[01] for Intel-based systems
DC/OSx 1.1 for Pyramid systems
Digital UNIX (DEC OSF/1) 2.0, 3.2, 4.0, and 5.0-Beta
FreeBSD 2.1.[67], 2.2 and 3.0 for Intel-based systems
HP-UX 9.01, 10.20, and 11.00
Linux 2.0.3[2346] and 2.1.8[89] for Intel-based systems
NetBSD 1.[23] for Intel and SPARC-based systems
NEXTSTEP 3.[13] for NEXTSTEP architectures
OpenBSD 2.[01234] for Intel-based systems
OpenStep 4.x
Reliant UNIX 5.4[34] for Pyramid systems
SCO OpenServer Release 3.0 and 5.0.[0245] for Intel-based
systems
SCO UnixWare 2.1.[123] and 7[.0.1] for Intel-based systems
Sequent PTX 2.1.9, 4.2.[13], 4.[34], and 4.4[.12] for
Sequent systems
Solaris 2.5.1, 2.6, and 7
SunOS 4.1.x
Ultrix 4.2
(See the DISTRIBUTION section of this manual page for
information on how to obtain the latest lsof revision.)
An open file may be a regular file, a directory, a block
special file, a character special file, an executing text
reference, a library, a stream or a network file (Internet
socket, NFS file or UNIX domain socket.) A specific file
or all the files in a file system may be selected by path.
Instead of a formatted display, lsof will produce output
that can be parsed by other programs. See the -F, option
description, and the OUTPUT FOR OTHER PROGRAMS section for
more information.
In addition to producing a single output list, lsof will
run in repeat mode. In repeat mode it will produce out
put, delay, then repeat the output operation until stopped
with an interrupt or quit signal. See the +|-r [t] option
description for more information.
[snip]
Michael
--
Michael Reiher
Student at Dresden University of Technology
Department of Computer Science
email: michael.reiher@gmx.de
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic