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


 
Thread Tools Search this Thread
Operating Systems AIX Opening a file in vi editor is giving out of memory error
# 1  
Old 01-15-2014
Opening a file in vi editor is giving out of memory error

Below is the error:

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

Please help me how do I open this file.



Best regards,
Vishal
# 2  
Old 01-15-2014
What is this file? How big is it?
# 3  
Old 01-15-2014
Belwo are the file details:

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


Best regards,
Vishal
# 4  
Old 01-15-2014
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
# 5  
Old 01-15-2014
Quote:
Originally Posted by Corona688
I do not think you can expect to edit a 70-megabyte file in vi.
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).

Quote:
Originally Posted by Corona688
If you just want to view it, try less filename
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
# 6  
Old 01-16-2014
You could also re-direct the temporary file it uses by adding the following into the file .exrc in your some directory:-
Code:
set dir=/scratch

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

Does this help?




Robin
Liverpool/Blackburn
UK
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed -i option giving error no such file or directory

I created a shell with sed -i option. It is giving error - No such file or directory Ex - sed -i 's/yes/no' yes.txt sed -i 's/why/where' yes.txt sed -i 's/when/how' yes.txt Error - :No such file or directory When I run single line in my script say sed -i 's/yes/no' yes.txt... (10 Replies)
Discussion started by: yahoo
10 Replies

2. UNIX and Linux Applications

Memory value editor.

Anybody know a equivalent program similar to T-Search for Mac and Linux. T-Search allows a person to load a program and edit memory values. Many people use to it edited lives or scores on games etc... (1 Reply)
Discussion started by: codecaine
1 Replies

3. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

4. Windows & DOS: Issues & Discussions

Error opening script file - location error

Hello, I know nothing about UNIX, ftp, etc. I am building an excel VBA macro which calls a .bat file. I've taken a pre-existing batch file and am trying to modify it to fit my purposes. I would be very grateful for some assistance. Here is my .bat file: echo off set... (9 Replies)
Discussion started by: starcraftbud
9 Replies

5. Programming

Error in opening a file C++

Hi, I have written a function which will open the file with the input name provided.Input name is in string format so while opening I am converting it using c_str().detail code below Plz let me know what is the wrong in code. 1 #include<iostream> 2 #include<fstream> 3 ... (4 Replies)
Discussion started by: forstudy3
4 Replies

6. Shell Programming and Scripting

Read/Search file being written to giving error due to timing issues

The following is a piece of code to rename LOG_FILE_NEW to LOG_FILE once you get a result (either RUNNING or SHUTDOWN) RESULT="" sleep 30 while ; do sleep 10 RESULT=`sed -n '/RUNNING/'p ${LOG_FILE_NEW}` if ; then RESULT=`sed -n '/SHUTTING_DOWN/'p ${LOG_FILE_NEW}` fi done mv... (3 Replies)
Discussion started by: sonorous
3 Replies

7. Programming

Error found while opening any pdf file from IE 6

Hello All, My application is followed J2ee architecture. It contains Java and jsp codes. This application generates some reports in pdf format. I am using Weblogic 10.3 and jdk 6. While I want to open the pdf in IE 6 with service pack 2 , the pdf not showing properly. It comes in byte code.... (3 Replies)
Discussion started by: priyankak
3 Replies

8. AIX

Shared memory giving wrong value

Hi , I am working on AIX 5.3 server.I have small program which stores the from database to a particaular shared memory.But while retreiving the valus from the same shared memory, i am getting wrong values. Please help..... (1 Reply)
Discussion started by: ajaysahoo
1 Replies

9. UNIX for Advanced & Expert Users

messages file memory error

Hi, Does anyone know if this is a patch error or a real memory problem, its happening a lot and wanted to know what to expect if I reboot it. prtdiag shows no errors. the system is anetra running solaris9 5.9 Generic sun4u sparc SUNW,UltraSPARC-IIi-cEngine Jan 5 15:23:39 t1 last message... (1 Reply)
Discussion started by: sun-days
1 Replies

10. Shell Programming and Scripting

how to know whether that file has eol or noeol before opening that file in VI editor

Hi, I want to check whether file has EOL or NOEOL before opening this file in VI editor. My file is very big its in terms of 15-20 MB. I am using ksh for this. When we opened the file in vi editor, normally at last line we are able to see whether this is eol or noeol file. But i does want... (1 Reply)
Discussion started by: HariRaju
1 Replies
Login or Register to Ask a Question