I was editing a file and Instead of typing ZZ to save and exit I typed something else by mistake. I think it might have been either ctl-z or ctl-c . Anyway it ended up abending the vi session. When I tried to get back in I was given that “your swap file is already being used” type error and so I deleted the swap file “rm /var/tmp/sas_pwd.swp”
I still got the same error so I did a “ps -ef|grep carbon” and found all of my running sessions, the first one being the vi session I’d apparently exited and it was still running so I did a kill -9 on that process and it ended.
I’ve done these things before when I’ve made this type of little mistake in vi and it would solve my issue.
However Now when I try to get back into the sas_pwd file I get the following error when I try to save and exit:
"sas_pwd" E212: Can't open file for writing Press ENTER or type command to continue
Bear in mind I’ve deleted this file and was starting from scratch. So I tried to open a brand new file.
So I tried to just touch the file and got the following.
[bcarbon@sasebcclpradh01 ~]$ touch sas_pwd touch: cannot touch âsas_pwdâ: Disk quota exceeded
We’re tight on disk space but does that have something to do with this? I don’t think so.
I then tried to edit ANY existing Linux file and got the following when trying to save and exit.
Here I’m doing this on an old log file. When I try to save and exit after typing anything in it I get the following:
"stoh.log" "stoh.log" E509: Cannot create backup file (add ! to override)
At this point I’m thinking the following: 1. I’ve had this issue before and had no problems fixing it. 2. Deleting the swap file has worked before without causing and additional issues. 3. Doing a kill -9 on the still running ‘vi’ session also has fixed that issue and has never caused any additional trouble. 4. Maybe this is related to the space issue on the SAS server in some way. a. I’m saying this because of 2 and 3 never having caused this specific type of editing issue before.
At this point I cannot edit and existing file nor can I create a new file in Linux.
Please let me know if you have any ideas.
df -h
a full disk could explain all your problemsDisk quota exceeded
says it all. Your user account owns files that comulatively are taking up more disk space that your administrator has permitted.