如何使用vi处理大文件(GB级别)?
To open files less than 2GB use following procedure
Step1 : Just execute vi command with out any file
#vi
Step2 :
In the command mode,
type :set directory=”any directory with enough free space”
Step3 :
Now open the file using
:e “file name”
And start editing it. Once you are done you can save and exit(:wq).
Through this way we can avaoid vi crashing.
eg:
cd directory
vi
:set directory=/tmp
:e filename
参考:https://kb.iu.edu/d/akqv
http://www.linuxnix.com/how-to-open-big-size-file-using-vi-editor/