Operating System - HP-UX
1758538 Members
2040 Online
108872 Solutions
New Discussion юеВ

largest file size supported by vi editor

 
SOLVED
Go to solution
Shivkumar
Super Advisor

largest file size supported by vi editor

what is largest file size supported by vi editor ?

Regards,
Shiv
8 REPLIES 8
Joseph Loo
Honored Contributor
Solution

Re: largest file size supported by vi editor

hi shiv,

it will depend on how much available space is in either /tmp or /var/tmp.

regards.
what you do not see does not mean you should not believe
Indira Aramandla
Honored Contributor

Re: largest file size supported by vi editor

Hi Shivkumar,

it will bepedn on the space allocated for your /tmp to hold the buffer.



IA
Never give up, Keep Trying
Yogeeraj_1
Honored Contributor

Re: largest file size supported by vi editor

hi,

also note that i had a case where i had to split the file into several ones using:
split -l 5 file tf

then editing them using
vi tf*

then finally rejoining them together using the '>>' operator


hope this helps!

kind regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Cem Tugrul
Esteemed Contributor

Re: largest file size supported by vi editor

Hi Shiv,

i think it depends on your /tmp size

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Peter Godron
Honored Contributor

Re: largest file size supported by vi editor

Shiv,
from man vi
" Maximum File Size
The maximum file length of 234,239 lines is silently enforced."
RAC_1
Honored Contributor

Re: largest file size supported by vi editor

The editor does not have file size limit per say, but no. of lines it can display.

the man page clearly says that. Also you can change temp dir. Once in vi session do set all. to set temp. dir, you need to set directory=/something
There is no substitute to HARDWORK
Shameer.V.A
Respected Contributor

Re: largest file size supported by vi editor

Hi Shiv,

Maximum Line Length is 4096 characters including 2-3 bytes for overhead. Thus, a line length up to 4092 characters should cause no problem. Attempting to create lines longer than the allowable maximum for the editor produces a line too long error message.

There is no limit of file size.

The maximum file length of 234,239 lines is silently enforced in man pages.

Other limits
+ 256 characters per global command list.
+ 128 characters in a file name in vi or ex open mode. On short-file-name HP-UX systems, the maximum file name length is 14 characters.
+ 128 characters in a previous insert/delete buffer.
+ 100 characters in a shell-escape command.
+ 63 characters in a string-valued option (:set command).
+ 30 characters in a program tag name.
+ 32 or fewer macros defined by map command.
+ 512 or fewer characters total in combined map macros.


It is better to refer the man pages of commands.

Regards

Shameer
.... See invisible, feel intangible and achieve impossible as everything is possible ....
Raj D.
Honored Contributor

Re: largest file size supported by vi editor

Hi Shiv ,

Make /tmp size big enough to hold and support big file for vi.


hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "