Results 1 to 3 of 3
Please forgive me if I am not posting this is the correct forum. I am extremely new at this, so please bare with me as I try to explain my ...
- 04-13-2011 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 1
VI Editor Help Please!
Please forgive me if I am not posting this is the correct forum. I am extremely new at this, so please bare with me as I try to explain my problem. At work we are using Cisco Voip phones and when setting them up we first create a config file in vi editor. I first use a program called putty. I signed into the program and typed vi filename..cnf to edit a config file, well I accidently exited out of the program before typing the command in vi to quit (I know I am an idiot). Anyways I go back into putty and the vi editor and type command vi filename.cnf and the warning message i have highlighted in blue below appears...
phn swap file by the name "filename.cnf.swp"
owned by root
filename: /tftpboot/filename.cnf
modified: yes
process ID: 5156
While opening file "filename.cnf"
1. another program maybe editing the same file.
if this is the case be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution
2. an edit session for this file crashed
if this is the case, use ":recover" or vim -r filename.cnf"
to recover the changes (see ":help recovery")
if you did this already delete the swap file "filename.cnf.swp" to avoid this message.
Does anyone know how I can find and delete the .swp file so I will not get this warning? I know this is happening because I closed out of vi incorrectly. Like I said I am new to this, so please explain in detail as much as possible. Thanks!
- 04-13-2011 #2Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,939
It is a hidden file in whichever directory you were in. Your output would indicate it is in the /tftpboot directory - /tftpboot/filename.cnf.Does anyone know how I can find and delete the .swp file so I will not get this warning?
If you see it there and since it shows being owned by root, you need to be root to remove it with the command: rm .filename.cnf.swp
Take care you're in the right directory and get the name of the file exactly right as shown in your directory.
- 04-14-2011 #3
If you have unsaved changes try vim -r filename.cnf to recover the session.
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.


Reply With Quote