[comp.bugs.4bsd] I wish vi were more graceful when a file system is full

haynes@ucbarpa.Berkeley.EDU (Jim Haynes) (01/18/89)

We all run systems with the disks 99% full 99% of the time don't we?
Or maybe the problem is that they are only 90% full most of the time.
Anyway, our semi-naive users have a fair amount of trouble when
they try to edit, and some jerk has filled up the file system, and
then they can't write the edited file back.  Those in the know
have learned to write to /tmp or /usr/tmp or some other place that
is safe for parking files; but most of them the first time manage to
lose both the edited file and the unedited file and come to me in tears.

So has anybody patched vi to give the user some kind of helpful
message suggesting what to do when the file cannot be written
because the file system is full?

gmp@rayssd.ray.com (Gregory M. Paris) (01/19/89)

In <27569@ucbvax.BERKELEY.EDU> haynes@ucscc.ucsc.EDU (Jim Haynes) writes:
> So has anybody patched vi to give the user some kind of helpful
> message suggesting what to do when the file cannot be written
> because the file system is full?

I have it say, "Don't quit!  Get help."  Works for about 75% of users.
Those that still do a ":q!" and get burned are less likely to be mad
at me than they were before.  Not a perfect solution by any means,
but it has helped.

-- 
Greg Paris <gmp@rayssd.ray.com>
{decuac,garp,gatech,necntc,spdcc,sun,uiucdcs,ukma}!rayssd!gmp
"Existence -- survival -- must cancel out programming!"

spaf@cs.purdue.edu (Gene Spafford) (01/19/89)

Whenever I used to teach short courses on vi, I would always teach
users that they could type ":preserve" if the disk filled up.  Assuming
that the disk you are writing to is not also the one where the
preserved file goes (usually the case), this works just dandy.

Of course, if "preserve" fails, then you've got the same problem....

Most people don't seem to know about "preserve" so I just thought
I'd mention it.
-- 
Gene Spafford
NSF/Purdue/U of Florida  Software Engineering Research Center,
Dept. of Computer Sciences, Purdue University, W. Lafayette IN 47907-2004
Internet:  spaf@cs.purdue.edu	uucp:	...!{decwrl,gatech,ucbvax}!purdue!spaf

kyriazis@rpics (George Kyriazis) (01/19/89)

In article <5861@medusa.cs.purdue.edu> spaf@cs.purdue.edu (Gene Spafford) writes:
>Whenever I used to teach short courses on vi, I would always teach
>users that they could type ":preserve" if the disk filled up.  Assuming
>that the disk you are writing to is not also the one where the
>preserved file goes (usually the case), this works just dandy.
>
>Of course, if "preserve" fails, then you've got the same problem....
>

Hmm..  I just tried 'preserve' in a sample file.  It barfed with
'preserve failed', but immediately after I got mail about my preserved
file which I recovered with no problem. 

Do you have any idea what I got this error while everything else seemed fine?


  George Kyriazis
  kyriazis@turing.cs.rpi.edu
  kyriazis@ss0.cicg.rpi.edu
------------------------------