|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
file too long error
I am new to Unix
I have been opening files in vi editor by command: vi filename But for certain files while using this command following error is displayed: File too long Can anyone help me how to fix this error. Thanks in Advance |
|
#2
|
|||
|
|||
|
Hi Rohit,
I'm no expert with vi but have found the following at URL http://nscp.upenn.edu/aix4.3html/cmds/aixcmds6/vi.htm Quote:
I don't know if it is possible to get round this particular limitation or even if the note is up to date, but it would make sense that there would be an upper limit on the size of file you can open for editing. If you just wanting to read the contents of the file then obviously commands pg, more, less, tail, and head can help. If you want to edit the file and the changes are small enough then "sed" might be a better tool. Otherwise, I'd probably split the file somehow and edit the chunks before putting it back together. Hmmm.... I'm interested if anyone has any other tips. Hope this helps until then. Andy |
|
#3
|
|||
|
|||
|
What O/S are you on? That is, Solaris, AIX, HP/UX, Linux, etc? Additionally, how big is the file you're trying to edit. You can do an ls -l on the file to see how big it is.
This sounds like it is an older O/S but the reality is that you simply may not be able to edit a file as big as you're trying to edit. |
|
#4
|
||||
|
||||
|
Quote:
Basically, the file you are trying to view is unwrapped from the editors point of view. It doesn't contain any valid wrapping character. My advice is to look around for a utility or script that will wrap the file at something like 80 bytes or so ( or one that will allow you to specify the wrap length ). Either way, that is what is quite possibly wrong. Regards, #jlk |
|
#5
|
|||
|
|||
|
note the diff:
a) line too long b) file too long also vi knows limits in case a the line is >1024 chars in case b the file is big, very big split it, edit and cat ![]() |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > file too long error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|