AIX上用vi打开一个很大的文件,抱错:
ex: 0602-101 Out of memory saving lines for undo
man vi 发现vi的限制
The following list provides the maximum limits of the vi editor. These counts assume single-byte characters.
* 256 characters per global command list
* 2048 characters in a shell escape command
* 128 characters in a string-valued option
* 30 characters in a tag name
* 128 map macros with 2048 characters total
* 1,048,560 lines silently enforced
* The macro name and the macro text are limited to 100 characters. Note: The vi editor supports a maximum of 2 GB edit
buffer.
wc -l xxx.log
使用数字大于该行就可以
越过这个限制,可以使用 vi -y 9999999 xxx.log