unable to rm hidden file
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Shell > unable to rm hidden file




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    unable to rm hidden file  
stingray


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-20-06 01:13 PM

Hi folks,
I try to delete the hidden file. It seem that
rm can identify the hidden file but the file still exist.
Could someone please advise me

Cheers,
Ray

bash-2.03 $ ls -lart
total 160
-rwxrwxrwx   1 xxxx mixsig     49152 Jan  9 17:30 .nfs735F
drwxrwsr-x  13 xxxx mixsig      2048 Jan 20 09:58 ..
drwxrwsrwx   2 xxxx mixsig     23552 Jan 20 10:06 .
bash-2.03 $ \rm -rfi .nfs735F
rm: remove .nfs735F (yes/no)? y
bash-2.03 $ ls -lart
total 160
-rwxrwxrwx   1 xxxx mixsig     49152 Jan  9 17:30 .nfs835F
drwxrwsr-x  13 xxxx mixsig      2048 Jan 20 09:58 ..
drwxrwsrwx   2 xxxx mixsig     23552 Jan 20 10:06 .






[ Post a follow-up to this message ]



    Re: unable to rm hidden file  
No_One


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-20-06 01:13 PM

On 2006-01-20, stingray <raymond.tan@mymeth.com> wrote:
> Hi folks,
>      I try to delete the hidden file. It seem that
> rm can identify the hidden file but the file still exist.
> Could someone please advise me
>
> Cheers,
> Ray
>
> bash-2.03 $ ls -lart
> total 160
> -rwxrwxrwx   1 xxxx mixsig     49152 Jan  9 17:30 .nfs735F <<<<<<
> drwxrwsr-x  13 xxxx mixsig      2048 Jan 20 09:58 ..
> drwxrwsrwx   2 xxxx mixsig     23552 Jan 20 10:06 .
> bash-2.03 $ \rm -rfi .nfs735F
> rm: remove .nfs735F (yes/no)? y
> bash-2.03 $ ls -lart
> total 160
> -rwxrwxrwx   1 xxxx mixsig     49152 Jan  9 17:30 .nfs835F <<<<<
> drwxrwsr-x  13 xxxx mixsig      2048 Jan 20 09:58 ..
> drwxrwsrwx   2 xxxx mixsig     23552 Jan 20 10:06 .
>

The file names are different............You did delete it, a program created
it again with a different file name.....don't delete it, something is using
it or needs it!!!!

ken






[ Post a follow-up to this message ]



    Re: unable to rm hidden file  
romy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-20-06 11:03 PM

these filese are temp files created by the process. i too suggest you
not to delete these files. i think the number present in name of these
file is the process id of the process which created theze files.






[ Post a follow-up to this message ]



    Re: unable to rm hidden file  
Keith Thompson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-20-06 11:03 PM

"stingray" <raymond.tan@mymeth.com> writes:
>      I try to delete the hidden file. It seem that
> rm can identify the hidden file but the file still exist.
> Could someone please advise me
>
> Cheers,
> Ray
>
> bash-2.03 $ ls -lart
> total 160
> -rwxrwxrwx   1 xxxx mixsig     49152 Jan  9 17:30 .nfs735F
> drwxrwsr-x  13 xxxx mixsig      2048 Jan 20 09:58 ..
> drwxrwsrwx   2 xxxx mixsig     23552 Jan 20 10:06 .
> bash-2.03 $ \rm -rfi .nfs735F
> rm: remove .nfs735F (yes/no)? y
> bash-2.03 $ ls -lart
> total 160
> -rwxrwxrwx   1 xxxx mixsig     49152 Jan  9 17:30 .nfs835F
> drwxrwsr-x  13 xxxx mixsig      2048 Jan 20 09:58 ..
> drwxrwsrwx   2 xxxx mixsig     23552 Jan 20 10:06 .

As the name implies, that's a file created by an NFS server.

On a locally mounted file system, removing a file removes the
directory entry, but doesn't necessarily delete the file itself; the
file remains on the disk as long as there's a hard link to it, or as
long as some process has it open.  In the latter case, the file still
occupies space on the disk, but there is no directory entry for it and
it has no name.  When the process using the file closes it, the file
itself is removed (i.e., the disk space is deallocated).

If you remove a file on an NFS server that another process is using,
the server needs to keep the file so the process can continue using
it, but since NFS doesn't provide access to the raw disk, it needs to
assign a name to the hidden file.  You removed the directory entry for
".nfs735F", and the server immediately created a new directory entry
".nfs835F".  It will continue doing so until the file is no longer
being used.

(I'm not an expert on NFS; I'm sure someone will correct me on
whatever details I've gotten wrong.)

If you examine the contents of the file, you may be able to guess what
process is using it.  You *might* be able to use something like lsof
to find out for sure.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
We must do something.  This is something.  Therefore, we must do this.





[ Post a follow-up to this message ]



    Re: unable to rm hidden file  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-21-06 07:49 AM

In article <lnslrifxdw.fsf@nuthaus.mib.org>,
Keith Thompson <kst-u@mib.org> wrote:

> As the name implies, that's a file created by an NFS server.
>
> On a locally mounted file system, removing a file removes the
> directory entry, but doesn't necessarily delete the file itself; the
> file remains on the disk as long as there's a hard link to it, or as
> long as some process has it open.  In the latter case, the file still
> occupies space on the disk, but there is no directory entry for it and
> it has no name.  When the process using the file closes it, the file
> itself is removed (i.e., the disk space is deallocated).
>
> If you remove a file on an NFS server that another process is using,
> the server needs to keep the file so the process can continue using
> it, but since NFS doesn't provide access to the raw disk, it needs to
> assign a name to the hidden file.  You removed the directory entry for
> ".nfs735F", and the server immediately created a new directory entry
> ".nfs835F".  It will continue doing so until the file is no longer
> being used.
>
> (I'm not an expert on NFS; I'm sure someone will correct me on
> whatever details I've gotten wrong.)

You're pretty close.  It's created by the NFS client -- the NFS server
has no way of knowing what processes are using the file.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:15 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register