I have modified the etc\hosts file and lost network connectivity while i was editing it.
When I launch putty and connect to the ESX host and try to edit the file, i get an information alert.
I have also looked in the \etc directory and there is only 1 hosts file
How can i find the file and delete it.
E325: ATTENTION
Found a swap file by the name ".hosts.swp"
owned by: root dated: Wed Mar 25 12:09:41 2009
file name: /etc/hosts
modified: YES
user name: root host name: esx2.ea.local
process ID: 28055
While opening file "hosts"
dated: Wed Mar 25 12:16:15 2009
NEWER than swap file!
(1) Another program may be 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 hosts"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".hosts.swp"
to avoid this message.
"hosts" 8L, 269C
Hit ENTER or type command to continue
Thank You
rm -rf /etc/.hosts.swp
Regards,
CLL SYSTEMS http://www.cllsystems.com
MALAYSIA VMWARE COMMUNITIES
I think you need to look for
.hosts.swp (note the "." before the filename).An "ls -a" should show you the file.
That is a temporary file created by your editor while you were editing the /etc/hosts file.
--sanjana
If you take option 2 to recover you should also be ok and remove the temporary file (hosts.swp) that was left there from the crashed edit session.
Also as when posted doing a ls -al should show the .hosts.swp file. Files starting with a . are not shown in an ls command with the -a option.
www.phdvirtual.com, makers of esXpress
rm -rf /etc/.hosts.swp
Regards,
CLL SYSTEMS http://www.cllsystems.com
MALAYSIA VMWARE COMMUNITIES
Thank You. I deleted the file and it seems to be working great now.
Good to hear things are working now, thanks for the helpful.
www.phdvirtual.com, makers of esXpress