Re: Delete a file THAT big? Surely you are joking.

[prev] [thread] [next] [lurker] [Date index for 2006/12/19]

From: Yossi Kreinin
Subject: Re: Delete a file THAT big? Surely you are joking.
Date: 07:40 on 19 Dec 2006

> 
> % sh randomscript.sh > file
> cat: duplicate writer
> % cat randomscript.sh
> #!/bin/sh
> 
> cat ~/.headerfile
> anotherscript.sh
> ...
> %
> 

I don't see a "duplicate writer". If the point is that I don't, but there is, 
somewhere down the guts - well, I agree that Unix shell scripts are not much fun 
to debug. That's why I never write them, and instead use languages emitting 
stack traces upon error.

> 
> 
> % sh longrunningprogram.sh > /tmp/stuff &
> % rm /tmp/stuff
> longrunningprogram.sh: output deleted -- core dumped
> %
> 
> Oh, that's definitely better!

No, that's the Unix Way. I meant:

% sh longrunningprogram.sh > /tmp/stuff &
% rm /tmp/stuff
/tmp/stuff: file is used by longrunningprogram.sh [pid 134]

> 
> Programs aren't paid to think.
> 

Programmers are.

> 
> NFS is too hateful to ignore, but it's too hateful to even bring up as a
> reason NOT to do something.
> 

What I was saying is that the "two-step" deletion (unlink, reclaim) is only 
marginally useful for creating temporary files. So the mechanism involved 
shouldn't get in the way when I do other things.
There's stuff above here

Generated at 03:01 on 20 Dec 2006 by mariachi 0.52