当输入 vi shell5.sh 时会出现以下信息
E325: ATTENTION
Found a swap file by the name ".shell5.sh.swp"
owned by: root dated: Thu Feb 24 09:26:20 2011
[cannot be read]
While opening file "shell5.sh"
dated: Thu Feb 24 09:21:31 2011
(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 shell5.sh"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".shell5.sh.swp"
to avoid this message.
"shell5.sh" 5L, 62C
Press ENTER or type command to continue
解决方法:删除当前文件夹下的shell5.sh.swp 即运行 rm .shell5.sh.swp
但是其实在当前文件夹下是找不到shell5.sh.swp的,不知道根本原因是什么 ,只知道执行完之后再vi 就OK了