How can unlinking be postponed?

Chris Torek chris at umcp-cs.UUCP
Mon Sep 9 21:15:49 AEST 1985


To give people another reason not to unlink open files (besides
that it does, er, ``interesting'' things under NFS [it *does*
work, I'm told]), consider the following:

	multi 1000 </usr/dict/words >/tmp/file1

(multi is a program that makes N copies of its input; here N is 1000)
Now suppose /tmp runs out of space.  You can:

	rm /tmp/file1		# oops, file didn't actually go away
	ps ax			# find the "multi" process
	kill <pid>		# get rid of it

or you can

	cp /dev/null /tmp/file1	# now have some time to fix things up

Bending the example a bit, suppose that /tmp runs out of file space
and there are a bunch of unlinked-but-open files.  To get rid of
the space these occupy, you must kill the processes holding them
open.  However, if there are ordinary files, you can just trim them
down to zero bytes.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.unix.wizards mailing list