home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!nixpbe!uranium!uranium!not-for-mail
- From: Josef Moellers <mollers.pad@sni.de>
- Newsgroups: comp.unix.questions
- Subject: Re: 2nd time:How to remove files?
- Date: 12 Nov 1992 16:46:48 +0100
- Organization: Siemens Nixdorf Informationssysteme AG, Paderborn, Germany
- Lines: 53
- Sender: josef@uranium.sto.pdb.sni.de
- Message-ID: <1dtu98INNkqq@uranium.sto.pdb.sni.de>
- References: <Nov.11.13.41.20.1992.909@skynyrd.rutgers.edu>
- NNTP-Posting-Host: uranium.sto.pdb.sni.de
- Keywords: remove, unix, corefiles
-
- In <Nov.11.13.41.20.1992.909@skynyrd.rutgers.edu> puchalek@skynyrd.rutgers.edu (michael) writes:
-
-
- > I posted this article in comp.unix.questions with a narrow
- >distribution, so I am reposting with a wider range. If you see it
- >twice, sorry.
-
- >I keep getting files added to my working directory such as 'xerrors'
- >and '.nfs***'. If I put a line in my .login that says 'rm xerrors', a
- >'xerrors:no such file' message appears every time I log in. If I leave
- >the 'rm xerrors' line out of my .login, the 'xerrors' file starts to
- >show up in my root directory. The '.nfs***' files appear whenever I
- >am working in the text editor, emacs in this case. I have uncommented
- >the line 'limit coredumpsize 0' in my .login. Any suggestions? If it is
- >more convenient to email, that's fine.
-
- I can't say anything about "xerrors", but as far as ".nfs***" is
- concerned:
- NFS is a stateless system. That means that neither the server, nor the
- client can assume anything about the state of the other side.
-
- One of the things the server is not allowed to know is the idea of "open
- files" on the client's side. Therefore, whenever the client opens a file
- on an NFS-mounted file system, and subsequently unlinks the file
- _before_ closing it, the client cannot completely remove the entry from
- the directory, as this might be the last reference to the file and the
- server (who doesn't know the file is still open on the client's side)
- will remove the file, freeing all disk blocks that are/were allocated to
- the file. UNIX's notion is, however, that the file remains on disk
- _until the file is closed for the last time_, i.e. until either the
- process closes the file or the process dies (closing the file
- implicitly).
- In order to allow the file to remain open and still "free" the directory
- entry (or at least allow the file's name to be re-used), the NFS client
- silently renames the file to ".nfs<number>", where <number> is generated
- automagically. When the process closes the file, the NFS client software
- will detect this and send an "unlink" command to the server which will
- then _really_ remove the file and free up all disk space.
-
- This will also pop up when You "open" the last file in a directory, then
- "unlink" it and then try to "rmdir" the directory it is in.
- Under S5 or UFS file systems, this works OK: the directory is gone.
- Under NFS, You'll get a "directory not empty" error, and when You look:
- voila! It's empty! B-{)
-
- Does this make sense to You?
-
- I assume that "xerrors" is created by some X-windows product and removed
- whenever the product terminates. So, why worry?
- --
- | Josef Moellers | c/o Siemens Nixdorf Informationssysteme AG |
- | USA: mollers.pad@sni-usa.com | Abt. STO-XS 113 | Riemekestrasse |
- | !USA: mollers.pad@sni.de | Phone: (+49) 5251 835124 | D-4790 Paderborn |
-