OEL修改字符集失败 -bash: /root: is a directory

ORACLE OEL修改完字符集,修改GB2312为UTF-8

[root@tip01 ~]# vi /etc/sysconfig/i18n 

LANG="en_US.UTF-8"


source后忽然出现异常
[root@tip01 ~]# source  /etc/sysconfig/i18n 
-bash: /root: is a directory
-bash: /root: is a directory
-bash: /root: is a directory

无论执行任何命令都出现令人讨厌的 -bash: /root: is a directory

[root@tip01 ~]# ls
-bash: /root: is a directory
-bash: /root: is a directory
-bash: /root: is a directory


按照LINUX修改系统字符集的该法应该没有问题才是
google一下 有个人的建议


楼主可以试试
在终端下手动执行
/root  就会弹出如上那个提示
可能是在每次打开终端时都自动执行了/root这个命令
可以打开.bashrc看一下
 vi  ~/.bashrc
然后在里面搜索 /\/root
搜到以后把它删掉就是

但是我的.bashrc没有/root的内容
[root@tip01 ~]# more .bashrc 
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi


最后尝试手工改回GB2312问题依旧,真是奇怪了

[root@tip01 ~]# vi /etc/sysconfig/i18n 

LANG="zh_CN.GB2312"

[root@tip01 ~]# source  /etc/sysconfig/i18n 
-bash: /root: is a directory
-bash: /root: is a directory
-bash: /root: is a directory


问题依旧,最后直接把i18n删掉,重新建立一个i18n文件,问题得到解决

[root@tip01 ~]# source  /etc/sysconfig/i18n 
[root@tip01 ~]# ls


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值