免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1861 | 回复: 0
打印 上一主题 下一主题

[系统管理] linux下vi命令打开最大文件限制 [复制链接]

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
1 [报告]
发表于 2014-05-29 22:54 |显示全部楼层
好像没有什么好方法可以手工限制。

32位的系统里面,最大可以打开2GB的文件。某些发行版里面的vi也有限制:
  1. vi places the following limits on files being edited.

  2. Maximum Line Length
  3. LINE_MAX characters (defined in <limits.h>), including 2-3 bytes for
  4. overhead. Thus, if the value specified for LINE_MAX is 2048, a line
  5. length up to 2044 characters should cause no problem.

  6. If you load a file that contain lines longer than the specified limit,
  7. the lines are truncated to the stated maximum length. Saving the file
  8. will write the truncated version over the original file, thus
  9. overwriting the original lines completely.

  10. Attempting to create lines longer than the allowable maximum for the
  11. editor produces a line too long error message.

  12. Maximum File Size
  13. The maximum file length of 234,239 lines is silently enforced.
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP