Opening a file in vi editor is giving out of memory error

Below is the error:

 Out of memory saving lines for undo - try using ed
:

Please help me how do I open this file.

Best regards,
Vishal

What is this file? How big is it?

Belwo are the file details:

-rw-r-----    1 oracle   dba        70715402 Jan 15 11:13 alert_orsqa_01.log

Best regards,
Vishal

I do not think you can expect to edit a 70-megabyte file in vi.

If you just want to view it, try less filename

In principle this is possible. Make sure you have enough room in the filesystem where vi writes its temporary files, because the first thing vi when opening a file does is to create a temporary working copy. Usually this directory is /var/tmp , but it can be configured to be elsewhere.

Furthermore you need to have enough (free) memory available to accomodate such a large process. This means not only to have it but also to be allowed to use it (check with uname -a ).

On AIX you should rather use more , especially as the AIX more can search, scroll forwards/backwards and do all sorts of useful things most people turn to less for. You could also use view , which is practically a vi in read-only mode.

I hope this helps.

bakunin

You could also re-direct the temporary file it uses by adding the following into the file .exrc in your some directory:-

set dir=/scratch

..... where /scratch is a filesystem with lots of space.

Does this help?

Robin
Liverpool/Blackburn
UK