Jeff Bailey on 28 Feb 2012 22:15:41 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] VI without a swapfile?


Thanks for all the input everyone - just wanted to add an interesting footnote on this...

the "edit elsewhere and cat > original location" turned out to be worse than vi.

Turns out that cat smoked the original file, and then aborted due to "no space on filesystem". So, whereas vi wouldn't let me edit the file, cat deleted it, then didn't store anything there (other than a 0 byte file). So, even though I was "cat'ting" a file smaller than the original, the filesystem reported no room. Interesting.

I *was* able to solve it in a more round-about way (by editing the source before it got built into the file which served as the filesystem), and thanks again for all the input.

On 2/27/2012 8:31 PM, Jeff Bailey wrote:
I can't clean stuff off the filesystem - it's minimal the way it is - the reason that I'm running into the problem is that I'm trying to debug something... Editing elsewhere might work though - hadn't looked at it that way.

Why not sed? I don't know sed. :-) I thought ed might work as well - just hadn't gotten to trying that (and also don't know ed, but, it seemed more accessible than sed).

Thanks, both....

On 2/27/2012 8:16 PM, Carl Johnson wrote:
why not a sed one liner with a regex?





Sent from my Motorola DynaTAC 8000x

Gary Duzan<gary@duzan.org>  wrote:

In Message<4F4C27BD.9030201@verizon.net>,
   Jeff Bailey<skydiver38@verizon.net>wrote:

=>Without getting into all the gory details, I have a loopback
filesystem
=>mounted (a file containing a filesystem) which is considered 100%
full
=>(according to "df").
=>
=>I need to edit a file on that mount.  "vi" complains about not being
=>able to create a swapfile, but allows me to edit.  The problem is
that I
=>can't save an edited version, even if all I do is delete lines.  I
think
=>this stems from the fact that vi tries to save a backup copy, and
fails
=>since there's no room.

   Copy the file to another file system, edit it there, then
"cat /path/to/copied/file>  /path/to/orig/file".

   Sometimes the primitive tools are best. :-)

   Of course, even better would be to clean stuff off that file
system.

                    Gary Duzan


___________________________________________________________________________
Philadelphia Linux Users Group         --
http://www.phillylinux.org
Announcements -
http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --
http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug