regarding vi editor

hello friends,
i wud like to get some suggestion for a Q i faced in an interview..........

the Q is...........
suppose a person is working on vi .the file is very large and he hasn't saved anything ........suddenly power goes off and system shuts down ...after power comes up the system is rebooted and working fine but can that person get his data?????????pls suggest .......

thx

girish

yes - see the man page for vi

-r filename
Edit filename after an editor or system crash. (Recov-
ers the version of filename that was in the buffer
when the crash occurred.)

If the system crashes, it will have saved your editor session in a recoverable file which is recovered with the -r option. Note that the last few commands, key strokes, may not be there but the majority of any changes will be.

When ever I use Vi editor on the solaris platform the backspace key does not work as expected also the delete key works as Caps key and the arrows key when used results in writing A B C D alphabets and the keys above the Ins and Del results in others alphabets like M N etc..

Did the Vi editor on the solaris works on the SPARC platform Is it possible to other editors rather than Vi here ........Please suggest....:rolleyes:

I am using solaris 10 ( Intel platform )

More likely the terminal emulation and TERM variable are not compatible.

That quite likely is the case. Chances are that the TERM variable should be set to one of {XTERM,VT100,VT200}, depending on the type of keyboard, but if it is something entirely different, then that should be taken into consideration. The XTERM terminal type may or may not support those keypad keys. Most terminals adhere to a pseudo VT100 set of key bindings. The VT200 has a few function keys in addition to those found on a VT100 keyboard. The typical PC keyboard can usually, but not always emulate VT100 sequences. Check and find out.