Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
vi can not open 500 MB text file
Name: Tmk Date: December 21, 2004 at 12:29:51 Pacific OS: AIX 5.2 ML 3 CPU/Ram: 8CPU/16GB RAM
Comment:
LPAR7->i2_Test_DF-OF01/i2/configuration>ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) unlimited memory(kbytes) unlimited coredump(blocks) unlimited nofiles(descriptors) unlimited LPAR7->i2_Test_DF-OF01/i2/configuration>ls -l tPromoD* -rw-r--r-- 1 root system 534701995 Dec 21 14:43 tPromoDtl1213.csv LPAR7->i2_Test_DF-OF01/i2/configuration>vi tPromoD* "tPromoDtl1213.csv"ex: 0602-026 No more memory for the append. Too many lines i n the file. [Press return to continue] LPAR7->i2_Test_DF-OF01/i2/configuration>vi -y 16235360 tPromoD* "tPromoDtl1213.csv" 8117690 lines, 534701995 characters Segmentation fault(cored ump)
Name: Jim Boothe Date: December 22, 2004 at 09:33:26 Pacific
Reply:
You may be out of disk work space. Jerry explains at: http://www.computing.net/unix/wwwboard/forum/6035.html how to change the vi work directory to one with more space.
In vi, do :set dir to display the current vi work directory (usually /var/tmp). And do :set dir=/whatever to change it. Then do :r myfile to read in your file.
0
Response Number 2
Name: thepubba Date: December 22, 2004 at 09:36:52 Pacific
Reply:
Open vi with the command:
vi
Once you have vi open, type:
:set directory=/bigfilesystem
# where bigfilesystem is the name of a filesystem that has over 500 megs of available space.
Type:
:r bigfile
If this doesn't work, you'll have to chop it up into smaller files and read them.
Summary: Perl (Practical Extraction and Reporting Language) would be the perfect tool for this task. It was originaly designed for (but not limited to) text processing. Once it parses the file, it can open a...
Summary: Sorry I'm not a Unix guru, how do I run the script? All I did was save the script as 'emailgrep' and change the 'SRC' filename: /export/home/user>more emailgrep #!/usr/bin/perl -w use strict; use Emai...