Solved

Nvi recovery program

Posted on 2006-07-13
3
650 Views
Last Modified: 2013-12-16
I was editing an index.html page this morning on a remote Debian 3.1 server using vi, which I now know is nvi (I assumed it was vim, which I'm used to from other distros). I forgot to save the file and closed my SSH client.

I then received an e-mail as follows:

--------8<--------
From: Nvi recovery program [mailto:root@myhost.mysubnet]
Sent: 13 July 2006 09:55
To: rstaveley@myhost.mysubnet
Subject: Nvi saved the file index.html

On Thu Jul 13 08:54:11 2006, the user rstaveley was editing a file named index.html on the machine myhost.mysubnet, when it was saved for recovery. You can recover most, if not all, of the changes to this file using the -r option to vi:

      vi -r index.html
--------8<--------

I'm absolutely delighted with this. I fixed my error straight away.

Here's my question:

The company I work for uses pico for on-line text editing, because most people are more enlightened than I am. Does the equivalent of the Nvi recovery program exist for pico too, including the mail alert?
0
Comment
Question by:rstaveley
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 125 total points
Comment Utility
No it does not:(

However, if you use the command:

screen

before running pico, even if you get disconnected, you wont lose your work. On reconnecting, you type:

screen -r

or you may have to give:

screen -r screenid

and you are back to where you were before you were disconnected.

(   (()
(`-' _\
 ''  ''
0
 
LVL 17

Author Comment

by:rstaveley
Comment Utility
That's very cool.

I've just tried putting the following into ~/.profile:

   screen -r || screen

It is nice, but doesn't handle screen resizes. The mail alert is what really tickled my fancy about nvi, though.
0
 
LVL 22

Expert Comment

by:pjedmond
Comment Utility
Pico (and nano)...are designed to be 'minimalistic' editors, hence their name! I think it unlikely that they would add such a function if the editor edited with an error. Even if it did, pico doesn't have any 'auto-backup' of progress process I'm afraid, so you wouldn't be able to recover anything.

>It is nice, but doesn't handle screen resizes.

Upgrade your version of screen. Although when you resize, it doesn't correctly fill additional blank space, the never versions of it definitely use the full 'screen' size.

(   (()
(`-' _\
 ''  ''

0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now