> Hello everyone,
>
>
> I have a file which is about 300MB and having problems opening
> with vi, it keep saying "tmp file too large".
> How do you redirect vi temp file?
>
> If I try to open it with emacs, it errors with "maximum buufer size exeeded"
> How do I increase emacs buffer size or fix this problem.
>
Your problem is that the disk partition where VI stores it's temp files
does not have enough free space. VI normally uses /tmp or /usr/tmp to
store information. Fortunately in VI, you can reassign a directory with
the ":set directory=<dirName>" where <dirName> is a name of a directory
that sits on really big disk partition. However you slice it, though,
300megs is one big file. You'll need a file system with about 400megs free
to edit your file in VI (i.e. if VI can handle files that large. The
biggest file I've used in VI is about 1/20 that size). Even if you can get
VI to edit the file, you'll find the whole thing painfully slow.
Another solution is to use the "split" command to break your file down
into smaller parts, then edit each of those parts. You then use the "cat"
command to put them together again. I used split several times when I had
to edit extremely large files (or what I thought were extremely large
files until I read your post). Although I could get VI to read and edit
the files, it was slow going. Breaking up the file into smaller pieces
made the job a lot faster.
Of course, you'll need 300 megs of free space to use the split command in
order to split your file since you're going to be duplicating this
information (at least temporarily). You might be able to use compress as
you split to save some disk space, but even with good compression, it'll
take about 50 to 100megs of free space.
If you don't need to edit the file, use the "less" command (if your system
has it). The "less" command is similar to "more", but has more options.
Less using a combination of VI and "more" command keys to go through a
file. You can scroll both backwards and forward in less, find extended
regular expressions, and mark places in your file.
--
David Weintraub _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Deutsche Morgen Grenfell _/ _/
dw...@dbna.com _/ I AM THE GREAT AND POWERFUL OZ* _/
dav...@cnj.digex.net _/ _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
*(Pay no attention to the man behind the curtains)
I have a file which is about 300MB and having problems opening
with vi, it keep saying "tmp file too large".
How do you redirect vi temp file?
If I try to open it with emacs, it errors with "maximum buufer size exeeded"
How do I increase emacs buffer size or fix this problem.
Please email and thank you in advance.
--
------------------------------------------------------------------
These opinions are mine and mine only, | qu...@pairgain.com
they do not reflect those of my employer | Pairgain Techonologies
//// Phone# (714)730-2371 FAX# (714)832-9924 ////
Greetings:
I can tell you EXACTLY what the problem is! The directory "/tmp" is located
on a partition with less than 300Mb of drive space free! One thing you can do
is to find a good chunk of free hard drive space (greater than 300Mb), and
mount it as "/tmp". Or, you could create a link from that partition, to the
"/tmp" directory!
Hope this helps,
------------------------------------------------------
THE PRECEDING REFLECTS THE VIEWS OF THE AUTHOR
AND NOT, NECESSARILY, THE VIEWS OF EDWARD JONES.
------------------------------------------------------
Daniel W. Erskine "mailto:ders...@apci.net"
(314) 515-2226 "mailto:sys...@edwardjones.com"
-> I have a file which is about 300MB and having problems opening
-> with vi, it keep saying "tmp file too large".
-> How do you redirect vi temp file?
I think that's not problem with vi/emacs. usually editors are not made to
edit so long files. you should split it and edit then or get other editor, I
think vile can edit so big files.
--
E-mail: Matus...@tuke.sk WWW: http://ccsun.tuke.sk/users/uhlar
IRC: fantomas, TALK: uh...@ccnews.ke.sanet.sk
...and if you think I'm talking for my employer, you're wrong...
> I have a file which is about 300MB and having problems opening
> with vi, it keep saying "tmp file too large".
> How do you redirect vi temp file?
In your .exrc file place the following entry:
set directory=/tmp
Of course, you can place it wherever you want.
---
Scott R. Nelson srne...@eng.sun.com
Sun Microsystems
"Proofread carefully to see if you any words out."
> Newsgroups: comp.sys.sun.admin,comp.unix.admin,comp.unix.shell,comp.unix.solaris> Path: trideuk.demon.co.uk!news.demon.co.uk!dispatch.news.demon.net!demon!
> tank.news.pipex.net!pipex!oleane!jussieu.fr!univ-lyon1.fr!howland.erols.net!
> netnews.com!ix.netcom.com!news4.noc.netcom.net!noc.netcom.net!howie!quang
> From: qu...@howie.pairgain.com (Quang Bui)
> Subject: vi questions
> Message-ID: <Dyq7L...@howie.pairgain.com>
> Organization: Pairgain Technologies
> X-Newsreader: TIN [version 1.2 PL0]
> Date: Fri, 4 Oct 1996 00:48:49 GMT
> Lines: 20
> Xref: news.demon.co.uk comp.sys.sun.admin:33349 comp.unix.admin:22846
> comp.unix.shell:17853 comp.unix.solaris:55237
>
> Hello everyone,
>
>
> I have a file which is about 300MB and having problems opening
> with vi, it keep saying "tmp file too large".
> How do you redirect vi temp file?
>
> If I try to open it with emacs, it errors with "maximum buufer size exeeded"
> How do I increase emacs buffer size or fix this problem.
>
> Please email and thank you in advance.
>
>
>
>
Try making more swap space by
mkfile -v 60M swapfile
swap -a swapfile
this will create a 60M file and use it as swap space for you if you need
to remove the file make sure you remove the swap as well or nasty things will
happen ...
--
-----------------------------------------------------------------------------
When I die I want to go peacefully in my sleep just like my Grandpa not
screaming like the passengers in his car :)
-----------------------------------------------------------------------------
Stephen Lowe Teleride (UK) Limited, 30 Gaolgate Street
step...@trideuk.demon.co.uk Stafford, England, ST16 2NT
Tel: +44 1785224242, Fax: +44 1785225552
Howdy,
In addition to the other good answers about /tmp and .exrc
to your posting, you might also have trouble with a limited
version of vi. I tried to handle a big file with the vendor
generic tools vi, head & tail and found some pieces were missing.
Switching to GNU versions made it work.
Bruce Bartram bbar...@etl.noaa.gov
usual disclaimers apply
Others have given you the direct solution. The indirect one is to not
use `vi' but to use the stream editor `sed' instead. For files as big
as this, I would strongly recommend this solution.
Regards,
Martin
E-mail: mle...@omg.unb.ca
WWW: http://www.omg.unb.ca/~mleese/
______________________________________________________________________
Want to know how Ambisonics can improve the sound of your LPs and CDs?
Read the Ambisonic Surround Sound FAQ. Version 2.7 now on my WWW page.
If this is Solaris, then you can increase the swap space to
greater than size of file to be edited, then it should work
fine. vi is very memory intensive - it appears to map the file
into memory - hence why it is s fast.
e.g:
mkfile 300M /export/SWAP
swap -a /export/SWAP
vi my_big_file
Note that /tmp lives on a tmpfs filesystem in Solaris, which
is effectively swap.
rgds dave
>In comp.sys.sun.admin Quang Bui <qu...@howie.pairgain.com> wrote:
>-> I have a file which is about 300MB and having problems opening
>-> with vi, it keep saying "tmp file too large".
>-> How do you redirect vi temp file?
>I think that's not problem with vi/emacs. usually editors are not made to
>edit so long files. you should split it and edit then or get other editor, I
Looks like a problem with the temporary file, vi tries to establish
in /tmp (a copy of the file to edit). 300MB sound pretty large for an
usual root filesystem installation. Find a Filesystem, where you have
(more than) 300 MB free and make a link from /tmp.
# mkdir LARGE-FS/WHEREVER/tmp
# ln -s LARGE-FS/WHEREVER/tmp /tmp
you should do this in single-user mode, if your system is loaded.
If you're not the system administrator, ask him. I don't know an
option (and I just re-checked with "man vi") for getting vi to
use another directory for the temporary-file.
Good Luck,
Bernhard
--
Bernhard Nowotny___________________...@sigma-c.de
| Team CAPROX, System- & Network-Administration *EMT-P* |
| Sigma-C GmbH, D-85521 Ottobrunn, Tel: (+49)89/6096051, Fax: 60860040 |
|_______________________"http://www.sigma-c.de/"_______________________|
if I said the problem looks imho outside then the problem looks imho
outside.
I tried to edit big file with vi and I had enough place on /var/tmp.
the problem was not low space but vi cannot edit bigger files than some
limit. that's how did it look by me. if it's true, people should really use
other editors...
: >In comp.sys.sun.admin Quang Bui <qu...@howie.pairgain.com> wrote:
: >-> I have a file which is about 300MB and having problems opening
: >-> with vi, it keep saying "tmp file too large".
: >-> How do you redirect vi temp file?
: >I think that's not problem with vi/emacs. usually editors are not made to
: >edit so long files. you should split it and edit then or get other editor, I
: Looks like a problem with the temporary file, vi tries to establish
In comp.sys.sun.admin, Matus Uhlar <Matus...@tuke.sk> wrote:
>I tried to edit big file with vi and I had enough place on /var/tmp.
Define "big file". I edit 20-30 MB files w/ vi regularly w/o a problem.
Several of them at once in fact.
>the problem was not low space but vi cannot edit bigger files than some
>limit. that's how did it look by me. if it's true, people should really use
>other editors...
I know of no arbitrary limit, but there could be one. vi under Solaris has
problems w/ lines longer than 1024. Several coworkers have installed vile 6.0
in place of vi because of this (vi will halt loading the file at the
first instance of a line >1024 characters).
Any such limitations were merely because whoever wrote the program decided
to make an arbitrary limitation, not because it was strictly necessary.
--
Tom Sorensen t...@dogbert.de.sc.ti.com | Fight the CDA |blue|
If I managed to represent TI in this post, then I'm | Responsibility | () |
probably far more surprised than TI is. | Starts at Home | /\ |
***SNIP***
For ?big? files, once inside vi:
:set directory=/some/large/area
:e!
If /some/large/area has enough space, the whole file will be read in.
--
Michael A. Crotteau
Caterpillar Inc. _/ _/ _/ _/_/
Systems Administration _/_/_/_/ _/_/ _/
Peoria, IL. _/ _/ _/ _/_/_/ _/
m...@cat.com _/ _/ _/ _/ _/_/
-> In comp.sys.sun.admin, Matus Uhlar <Matus...@tuke.sk> wrote:
-> >I tried to edit big file with vi and I had enough place on /var/tmp.
-> Define "big file". I edit 20-30 MB files w/ vi regularly w/o a problem.
-> Several of them at once in fact.
40 MB INN's history file. I had enough space on /tmp /var/tmp and it looks
vi cannot edit such file...
Sure it always strictly lazyness on the part of programmers not to
support files in excess of pow(2,sizeof(long)*NBBY) lines by
pow(2,sizeof(long)*NBBY) chars per line. If your editor is too
weak for such a file, well YOU'RE JUST GOING TO HAVE TO UPGRADE.
[Eli wonders to himself how many filesystems support partitions
large enough to hold such a file.]
The problem here is that vi was designed to edit text files. A very long
time ago someone trying to characterize text files decided that they would
have no lines longer than X bytes where X was a convient power of two.
Since then various versions of vi have changed the size of X, but it
reamins an inheritant limitation. The vi clones try to be much more
flexible by using very large powers of two. vim can handle files up to
pow(2,31)-1 lines by with line lengths implementation dependent at
pow(2,16)-1 for 16 bit machines and pow(2,31)-1 for 32 bit machines,
if have tmp space for a file that large.
Elijah
------
vim also has a rudimentary binary mode
According to Rabia Messaoudi <Rabia.M...@scinfo.u-nancy.fr>:
:Bernhard Nowotny (n...@sigma-c.de) wrote:
:: uh...@ccnews.ke.sanet.sk (Matus Uhlar) writes:
:
:: >In comp.sys.sun.admin Quang Bui <qu...@howie.pairgain.com> wrote:
:
:: >-> I have a file which is about 300MB and having problems opening
:: >-> with vi, it keep saying "tmp file too large".
:: >-> How do you redirect vi temp file?
:: Looks like a problem with the temporary file, vi tries to establish
:: in /tmp (a copy of the file to edit). 300MB sound pretty large for an
Use of the environment variable TMPDIR allows one to redirect where vi
looks for /tmp type space. However, if redirecting /tmp doesn't help,
change /var/tmp/vi.recover to be a symlink to another place where there
is more space. This is the directory where vi's trying to keep a log of what
you are doing so that you can recover after an error.
One final suggestion. Get the latest nvi, which helps compensate for
a lot of built in limits that the default vi has.
--
:s Larry W. Virden INET: lvi...@cas.org
:s <URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
:s Unless explicitly stated to the contrary, nothing in this posting should
:s be construed as representing my employer's opinions.
where /some/disk has a sufficient amount of free space in it. An advantage of
establishing your ~/.exrc file of course is that you'll only do it once, and
won't have to remember how to use the command manually each time you're editting
large files. Good luck.
On Thu, 17 Oct 1996, Michael A. Crotteau wrote:
> Tom Sorensen wrote:
> >
> > [courtesy cc of this posting sent to cited author via email]
> >
> > In comp.sys.sun.admin, Matus Uhlar <Matus...@tuke.sk> wrote:
> > >I tried to edit big file with vi and I had enough place on /var/tmp.
> >
>
> ***SNIP***
>
> For ?big? files, once inside vi:
>
> :set directory=/some/large/area
> :e!
>
> If /some/large/area has enough space, the whole file will be read in.
>
> --
> Michael A. Crotteau
> Caterpillar Inc. _/ _/ _/ _/_/
> Systems Administration _/_/_/_/ _/_/ _/
> Peoria, IL. _/ _/ _/ _/_/_/ _/
> m...@cat.com _/ _/ _/ _/ _/_/
>
>
virtually,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| Norm Szcyrek - Systems Analyst/GIS Specialist |
| Natural Resources Canada, Canadian Forest Service |
| Forest Resource Economics Section, Sault Sainte Marie, Ontario, Canada |
| email: nszc...@fres2.glfc.forestry.ca |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=