切换回root是提示-bash: Export: command not found错误

Leshami
博客专家认证
2010-04-13 09:30:03
RHEL5下安装了Oracle 10g,我的PATH 配置貌似没问题啊?
[root@robinson ~]# su - oracle
[oracle@robinson ~]$ su - root
Password:
-bash: Export: command not found
[root@robinson ~]# su - oracle
[oracle@robinson ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs



# Oracle Settings
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/10g
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$PATH
export PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LANG=en

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
...全文
2161 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
randyit 2012-02-01
  • 打赏
  • 举报
回复
vim /etc/profile

:/Export
csu_yang 2010-10-10
  • 打赏
  • 举报
回复
大写了E的问题 应该是export 才对的 呵呵 我也犯同样的错误 不过是人家误导的
Leshami 2010-04-18
  • 打赏
  • 举报
回复
没找到阿
sabflying 2010-04-18
  • 打赏
  • 举报
回复
export写成了Export,由于只有root用户报错,估计错误出在 . ~/.bashrc
文件中
louyong0571 2010-04-15
  • 打赏
  • 举报
回复
find 一下这个Export吧
liucy1983 2010-04-14
  • 打赏
  • 举报
回复
你是找的/root/.bash_profile /root/.bashrc吗,因为你是登录root后才报的这个错误
Leshami 2010-04-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 steptodream 的回复:]
-bash: Export: command not found
不是PATH的设置问题 很明显你的某个设置文件里的export的第一个字母写成大写了Export linux是严格区分大小写的 所以没有该命令
检查~/.bash_profile ~/.bashrc /etc/profile等文件 看看是哪儿的export写成Export了
[/Quote]
按你的提示,查找了上述的三个文件,没有发现有Export的?不知道到底是哪个文件中出现了Export ?
steptodream 2010-04-13
  • 打赏
  • 举报
回复
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$PATH
这一句PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin 就可以了吧
steptodream 2010-04-13
  • 打赏
  • 举报
回复
-bash: Export: command not found
不是PATH的设置问题 很明显你的某个设置文件里的export的第一个字母写成大写了Export linux是严格区分大小写的 所以没有该命令
检查~/.bash_profile ~/.bashrc /etc/profile等文件 看看是哪儿的export写成Export了

19,613

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧