- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- vi file error: Line too long
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 01:16 AM
тАО10-05-2006 01:16 AM
when i try to vi a file, i got "line too long"
error.
in man page, i found:
--------------------
Maximum Line Length
4096 characters including 2-3 bytes for overhead. Thus, a line length
up to 4092 characters should cause no problem.
If you load a file that contain lines longer than the specified limit,
the lines are truncated to the stated maximum length. Saving the file
will write the truncated version over the original file, thus
overwriting the original lines completely.
Attempting to create lines longer than the allowable maximum for the
editor produces a line too long error message.
whether i missed something, i dont know..
searched in itrc and no results..
ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 01:25 AM
тАО10-05-2006 01:25 AM
Solutionif you have to edit a line that big, you may be better off with vim (http://www.vim.org/about.php)
If you just want to read the file:
more filename
vi -R filename
Or you can 'chop up' the file with split and then reassemble with fold.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 01:39 AM
тАО10-05-2006 01:39 AM
Re: vi file error: Line too long
If you need to edit interactively, you could use another editor, such as vim, emacs, or nano. If not, you could stream edit with sed, awk, or perl. Or insert newline characters at a specific column position to bring the overall length under the limit, edit with vi, and then remove the newly-inserted newlines.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 01:50 AM
тАО10-05-2006 01:50 AM
Re: vi file error: Line too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 04:31 AM
тАО10-05-2006 04:31 AM
Re: vi file error: Line too long
In our shop we tend to avoid creating data as you describe for obvious reasons. When unavoidable, and the need to edit arises, the easiest solution for our developers was using UltaEdit.
I know there are a number of other solutions to your issue, unfortunately I do not have other answers.
Best of luck on this.
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 05:17 AM
тАО10-05-2006 05:17 AM
Re: vi file error: Line too long
Now if the file really is an ASCII file, and you know that it has extremely long lines, vi is not the right tool. Managing data of that size with a simple editor is not practical. Your application probably needs refining to handle the editing.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 05:35 AM
тАО10-05-2006 05:35 AM
Re: vi file error: Line too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 06:37 AM
тАО10-05-2006 06:37 AM
Re: vi file error: Line too long
~cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2006 11:08 PM
тАО10-05-2006 11:08 PM
Re: vi file error: Line too long
1. cat myfile | sed G | adjust > myfile2
This MIGHT make the line length short enough.
2. Another option would be to use the dd command. I would give the syntax. But I don't remember if you "block" or "unblock" to 80 characters. Oh here's the syntax anyway....
dd if=./myfile of=./myfile2 conv=block cbs=80
Now try to vi file myfile2.
steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2006 08:19 AM
тАО10-06-2006 08:19 AM
Re: vi file error: Line too long
i will update u little later..
thanks for the response.