Originally Posted by persistentd
I am trying to do a simple edit using vi on a large .sh file 818532 in size. I have loads of swap so I can't understand why I get the write error.
Swap 4192956K total, 2270396k used and 1922560k free
Am I missing something obvious.
Smaller file can be edited without any problems.
The OS is Linux Redhat 5
Okay, a couple of things.
- What is the exact error output you are getting?
- Do you have any filesystem quotas in place?
- What is the output of 'df'?
- What are the permissions on the directory that contains the file you are editing?
- Are you sure of the version of Red Hat? Are you running RHEL5?
It sounds like you might be filling up a partition when trying to edit the file. I have been able to edit up to 250MB files in vi
in the past. You just have to make sure that the filesystem you do the edit within has the space to write another copy of the file, like vi
does when it creates it's ./.<filename>.swp file.
The reason for question #5 is because Red Hat Linux 5 hasn't been directly available for years (though I still have one of the old boxes with CDs in my closet) and was last updated on 16-Apr-1999
. Red Hat's Enterprise Linux 5 is a fairly recent distro release, originally released in 14-Mar-2007
, with update3 released in January of this year. Just trying to cut down the possible confusion.
[NOTE: It seems you edited the post as I was writing this as your current post has much more than what I have above, which I got from clicking 'Quote'. From what I see, I am not sure your original number was correct. Are you sure the original .sh file is just shy of 800KB? I can't see vi going to over 1GB for an 800KB file. 800MB, maybe?]
If you have the desktop up, you can try editing the file in gedit.