03-07-06 10:54 PM
blackdog wrote:
>
> I have a huge file, could not open it by using vi or xemacs.
> please help.
The real problem you're facing is how it got too big in the first
place. Any method that let's you deal with the contents of
that file isn't going to help you with that real problem. Find
out why and treat the disease not the symptom. Any effort
of treating the symptom will eventually just yield a bigger
file the next time that eventually won't work with ways to
deal with the symptom.
One case where viewing the contents will help with the
cause not the symptom is if it's a log file. Look at all the
options for head and tail then start combining with perl,
awk, grep or whatever.
To be able to view it whole - Either make /tmp much bigger
so the temp file fits or expand swap space until it fits in
virtual memory. In principle files can grow to the point they
cannont fit in virtual memory so this would stop working
at the address space size of your host.
To chop it up into bite sized bits - see head, tail, split.
In general, viewing it whole isn't going to help, though. If
it won't fit in vi, there's no way you'll be able to scroll
through it and use your eyes as the processing method.
Efforts towards that are wasted without other types of
filtering.
[ Post a follow-up to this message ]
|