[问题]对.bash_profile做了些错误操作后……

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
killerpro
帖子: 22
注册时间: 2007-05-11 16:54

[问题]对.bash_profile做了些错误操作后……

#1

帖子 killerpro » 2007-07-06 2:24

E325: ATTENTION
Found a swap file by the name ".bash_profile.swp"
owned by: sandwich dated: Fri Jul 6 01:57:13 2007
file name: ~sandwich/.bash_profile
modified: YES
user name: sandwich host name: sandwich-desktop
process ID: 8626
While opening file ".bash_profile"
dated: Fri Jul 6 01:29:57 2007

(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 .bash_profile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".bash_profile.swp"
to avoid this message.
".bash_profile" 3 lines, 102 characters
Press ENTER or type command to continue


然后出现这样的东西……
怎么怎么样删除.bash_profile.swp??

还有,如果我真的想对.bash_profile进行修改的话……
怎么怎么修改??
例如我想在里面加入:
export GTK_IM_MODULE=xim
export XMODIFIERS=”@im=fcitx”

应该怎么弄??
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#2

帖子 xhy » 2007-07-06 8:11

用vim编辑后 不要使用鼠标关闭终端
要先退出vim再关闭终端

任何运行在终端程序 最好都不要直接关闭终端
目前负债150多万
killerpro
帖子: 22
注册时间: 2007-05-11 16:54

#3

帖子 killerpro » 2007-07-06 9:20

那么我应该怎么弄呢现在……?

怎么删除那个.swp?

还有……

用完vim,应该怎么保存……

和怎么不保存退出的??
igi
帖子: 3
注册时间: 2007-04-22 17:00

#4

帖子 igi » 2007-07-06 9:34

killerpro 写了:那么我应该怎么弄呢现在……?

怎么删除那个.swp?

还有……

用完vim,应该怎么保存……

和怎么不保存退出的??

先退出编辑模式,按esc可以退出,然后输入 wq (代表写入并退出)

不保存就是!q

也可以在命令模式下直接输入 ZZ (保存) ZQ(不保存) 注意是大写的
igi
帖子: 3
注册时间: 2007-04-22 17:00

Re: [问题]对.bash_profile做了些错误操作后……

#5

帖子 igi » 2007-07-06 9:35

killerpro 写了:E325: ATTENTION
Found a swap file by the name ".bash_profile.swp"
owned by: sandwich dated: Fri Jul 6 01:57:13 2007
file name: ~sandwich/.bash_profile
modified: YES
user name: sandwich host name: sandwich-desktop
process ID: 8626
While opening file ".bash_profile"
dated: Fri Jul 6 01:29:57 2007

(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 .bash_profile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".bash_profile.swp"
to avoid this message.
".bash_profile" 3 lines, 102 characters
Press ENTER or type command to continue


然后出现这样的东西……
怎么怎么样删除.bash_profile.swp??

还有,如果我真的想对.bash_profile进行修改的话……
怎么怎么修改??
例如我想在里面加入:
export GTK_IM_MODULE=xim
export XMODIFIERS=”@im=fcitx”

应该怎么弄??

这个你重新编辑并保存一下就没问题了
回复