AIX - VI editor issues

When I vi a large file on AIX, I get the following error

ex: 0602-101 Out of memory saving lines for undo.

Is there any work around for this
sgangenamoniAsked:
Who is Participating?
 
woolmilkporcConnect With a Mentor Commented:
Additionally to could open a vi session (without specifying a filename) and enter
:set
to display all settings.
Please look particularly at "directory=..." and "linelimit=..."
Does the indicated "directory" (if any) have enough space? Does your line count fit into "linelimit" (if set)?
The design maximum for linelimit is 1,048,560.
If in doubt, please post the results of  ":set"
wmp
0
 
woolmilkporcCommented:
Cleanup the /var filesystem
0
 
sgangenamoniAuthor Commented:
My var is only 21% used
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
sgangenamoniAuthor Commented:
The file is 45MB and my VAR has 1GB in total
0
 
omarfaridCommented:
what do you want to do with this file?
0
 
madunixCommented:
i think in unix you can use csplit
0
 
madunixConnect With a Mentor Commented:
or try the following
-open vi without calling up the file name.
-in command mode type :set directory="directory name"
-then open the file using :e "large file name"
0
 
jazzIIIloveCommented:
The solutions above seems accurate to me:

I recommend having empty for /var/tmp or splitting it as said above.

Or is it possible for you to use emacs since it has no such limiation?

Best regards.
0
 
woolmilkporcConnect With a Mentor Commented:
Hi,

to narrow down the cause of this error please do the following:

1) Check the number of lines in the file:
wc -l large_file

2) set a new line limit:
export EXINT='set ll=###'
with ### being a number greater than (!) the result of step (1)

3) try again:
vi large_file
If this is successful, consider setting the line limit permanently by adding export EXINIT=... (like above) to your $HOME/.profile or by creating a $HOME/.exrc file containing the ll=... (like above) statement.

If this doesn't help - what is your AIX level?

If it's 5300-01 or even below it might well be that you're the victim of an AIX bug (APAR# IY66327)

Upgrading to the latest AIX 5.3 Technology Level will help.
Find the TL pack here:
http://www-933.ibm.com/eserver/support/fixes/fixcentral/pseriesfixpackinformation/5300-11-00-0943
and the latest service pack here:
http://www-933.ibm.com/eserver/support/fixes/fixcentral/pseriesfixpackinformation/5300-11-01-0944

wmp



0
 
sgangenamoniAuthor Commented:
I see that madunix solution is giving me an approach but what is the directory name here. I want to open /oradbhome/ora/oradiag.log

Is my directory /oradbhome/ora/ ..???
0
 
woolmilkporcCommented:
sorry, a typo in the variable name, it's EXINIT
0
 
madunixCommented:
set directory="any_directory_with_enough_free_space"
0
 
omarfaridCommented:
what is the lines max length in this file? it could be a problem if line length is more than 2048 bytes.
is disk quota enabled by any means?
0
 
sgangenamoniAuthor Commented:
I am running TL9-SP1
0
 
omarfaridCommented:
can you provide more info about file content? is it text file? if you run

file filename

what do you get?
0
 
woolmilkporcCommented:
Did you try my suggestions 1) - 3) ?
0
 
sgangenamoniAuthor Commented:
Omar - How do I calculate the max length of a file

wmp - I think the solution didnt work, Also my IBM APAR is at the latest level
bos.rte.edit               5.3.9.0  COMMITTED  Editors
0
 
woolmilkporcCommented:
What do you mean ... "I think..."?
0
 
omarfaridCommented:
Is it a text file? vi can't deal with binary files. Can you tell what is in the file? you could use command like head to see few lines from the file. What the command

file filename

shows?
0
 
sgangenamoniAuthor Commented:
woolmilkporc - I tried (1-3) did not fix my issue, Sorry "I think.." is wrong to use there.
0
 
sgangenamoniAuthor Commented:
Its not a binary file, Its a log file.

When I ran ur command here is the output

root@csc06oraacc12 $ file oradiag.log
oradiag.log : ascii  test
[/oradbhome/ora ]

0
 
omarfaridCommented:
sorry, but again do you have any disk quota enabled?
0
 
sgangenamoniAuthor Commented:
no my disk quota is not enabled..Omar
0
 
woolmilkporcConnect With a Mentor Commented:
Max. line length of a file

awk 'BEGIN {l=0} ; {if (l<length($0)) {l=length($0)}}  END {print l} ' oradiag.log
 
 as omarfarid says - this value may not exceed  2048 (LINE_MAX as set in /usr/include/sys/limits.h)
 
 But when it's exceeded you should get a different error message!
0
 
sgangenamoniAuthor Commented:
Hello Omar and wmp,
My max line lenth of the file is 91
0
 
woolmilkporcCommented:
What is the line count (from my wc -l thing)?
0
 
madunixCommented:
give me the ulimit -a for the user you logged in ..

madunix
0
 
sgangenamoniAuthor Commented:
The above solutions solved part of my problem but not complete, rather it gave me an approach..Thanks for the answers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.