RE: Checking thew ststus of a file



Check the command "fuser".


-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Padiyath
Sreekumaran
Sent: Thursday, 13 December 2007 11:25 p.m.
To: redhat-list@xxxxxxxxxx
Subject: Checking thew ststus of a file


Hello,
How can I check the status of a file (open, closed) in a shell script?
Is there an example available?
Can I use lsof command and how?

Thanks in advance,
Kumar
------------------------------------------------------------------
Padiyath Sreekumar | Tel: +41.56.310.3643
Paul Scherrer Institut | email: kumar.padiyath@xxxxxx
AIT | Office: WHGA/U132
WHGA/U132 | Fax: +41.56.310.3649
CH-5232 Villigen PSI |
Switzerland |
-----------------------------------------------------------------

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
==========================================================
For more information on the Television New Zealand Group, visit us
online at tvnz.co.nz
==========================================================
CAUTION: This e-mail and any attachment(s) contain information that
is intended to be read only by the named recipient(s). This information
is not to be used or stored by any other person and/or organisation.


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



Relevant Pages

  • Re: Newbie help for using multiprocessing and subprocess packages for creating child processes
    ... the first is the conceptual equivalent of executing the ... The first searches for a command in your PATH named ‘ls /path...’. ... where STANAME is a string 4 characters long. ... firing off my shell script: ...
    (comp.lang.python)
  • Re: Newbie help for using multiprocessing and subprocess packages for creating child processes
    ... The first searches for a command in your PATH named ‘ls /path...’. ... where STANAME is a string 4 characters long. ... firing off my shell script: ...
    (comp.lang.python)
  • print subsystem errors
    ... I have an application that executes a shell script to print jobs. ... I can take the same command issued in the shell script; ... ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ...
    (AIX-L)
  • Re: despair
    ... I once tried to write a cd program in Unix. ... Just putting a cd command in a script and then ... hell are you supposed to write shell script macros to run a frequently ... make "$ FOO BAR" a meaningful DCL command. ...
    (comp.os.vms)
  • Re: cron and command quote
    ... if you are going to be using a shell script you have to make sure that it exits properly. ... So, '||' is just as legal as '&&' and would do just as it does on the command line, assuming of course there is nothing found by the grep. ... with && we have execute command1 if it returns true execute command2 ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)