.nfs file - Unix

This is a discussion on .nfs file - Unix ; Hi, This morning I spotted one .nfs file (.nfs05b600005000006) on our linux server (OS: redhat), which is 3 gb. Is it safe to delete it? And what kind of file is it? Could it be generated when some jobs (like ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: .nfs file

  1. .nfs file

    Hi,

    This morning I spotted one .nfs file (.nfs05b600005000006) on our linux
    server (OS: redhat), which is 3 gb.

    Is it safe to delete it? And what kind of file is it?

    Could it be generated when some jobs (like gunzip) are abnormally
    interrupted? (power outrage happened when we were doing gunzip last
    night)

    Thank you.
    Jerry


  2. Re: .nfs file

    In article ,
    Bill Marcum wrote:

    > On 17 Nov 2005 08:38:47 -0800, Jerry
    > wrote:
    > > Hi,
    > >
    > > This morning I spotted one .nfs file (.nfs05b600005000006) on our linux
    > > server (OS: redhat), which is 3 gb.
    > >
    > > Is it safe to delete it? And what kind of file is it?
    > >

    > It's a temporary file created when the connection between nfs server and
    > client is broken. It should go away when the connection is restored.
    > If not, look around and see if you are missing any 3GB files.
    > You can use "file" to see what kind of file it is.


    No it is not.

    It's created by an NFS client when a file that's still open is removed,
    so that the process can continue to access the file. It will go away
    when all the processes that have the file open on that client close the
    file (or exit, which will automatically close all their open files).

    To demonstrate this, do the following on an NFS client (my comments are
    in parentheses):

    sleep 100 > temp.file &
    ls -i temp.file
    rm temp.file
    ls -i .nfs*
    (this should show a .nfs file with the same inode number that temp.file
    had)
    kill %1
    ls -i .nfs*
    (that .nfs file should be gone now)

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***

+ Reply to Thread