当前位置: 技术问答>linux和unix
Red Hat Linux9 登录错误,请各位帮忙看看!
来源: 互联网 发布时间:2016-09-01
本文导语: 登录出现如下信息: -bash: id: command not found -bash: [: =: unary operator expected -bash: id: command not found -bash: dircolors: command not found -bash: id: command not found -bash: id: command not found -bash: id: command not found -bash: [:...
登录出现如下信息:
-bash: id: command not found
-bash: [: =: unary operator expected
-bash: id: command not found
-bash: dircolors: command not found
-bash: id: command not found
-bash: id: command not found
-bash: id: command not found
-bash: [: too many arguments
出现如下信息是在为增加了一个硬盘之后。增加的分为两个区,分别挂载在/opt和/usr,修改了/etc/fstab,使开机自动加载此两个分区。
检查过/etc/profile,未发现异常情况。
请问,这个是什么问题?如何解决?
-bash: id: command not found
-bash: [: =: unary operator expected
-bash: id: command not found
-bash: dircolors: command not found
-bash: id: command not found
-bash: id: command not found
-bash: id: command not found
-bash: [: too many arguments
出现如下信息是在为增加了一个硬盘之后。增加的分为两个区,分别挂载在/opt和/usr,修改了/etc/fstab,使开机自动加载此两个分区。
检查过/etc/profile,未发现异常情况。
请问,这个是什么问题?如何解决?
|
把分区直接挂到/opt 和 /usr ,确实屏蔽了目录下的内容。
----------------------
并不是屏蔽
你出现错误的原因是 /opt /usr下的内容还在原来的分区下
而你新增加的分区 硬盘空间都变了 可是内容并没有过来
举个例子
原来有2个房子在X县 门牌号是/opt和/usr
你在Y县新建了2个房子 打算把/opt和/usr搬过来 但是你只把门牌号/opt和/usr拿下来挂到了新家的门上 可是屋里的东西还在老家里
----------------------
并不是屏蔽
你出现错误的原因是 /opt /usr下的内容还在原来的分区下
而你新增加的分区 硬盘空间都变了 可是内容并没有过来
举个例子
原来有2个房子在X县 门牌号是/opt和/usr
你在Y县新建了2个房子 打算把/opt和/usr搬过来 但是你只把门牌号/opt和/usr拿下来挂到了新家的门上 可是屋里的东西还在老家里
|
把分区直接挂到/opt 和 /usr ? 这样会屏蔽目录下的内容,可执行文件id 估计就在/usr目录下面把?
把挂载点修改成其他的吧
把挂载点修改成其他的吧
|
/etc/fstab
检查一下
检查一下
|
如果没有其他的分区挂在/mnt目录的话
mkdir -p /mnt/first_part
mkdir -p /mnt/second_part
把/etc/fstab中两个分区的挂载点分别修改为 /mnt/first_part /mnt/second_part
总而言之,使用空目录作为挂载点
mkdir -p /mnt/first_part
mkdir -p /mnt/second_part
把/etc/fstab中两个分区的挂载点分别修改为 /mnt/first_part /mnt/second_part
总而言之,使用空目录作为挂载点
|
不知道你有没有更改其他的设定文件?
也不知道你给/opt 和 /usr 下追加分区的作业是否正确?
你先看看这2个目录下 现在有数据吗?
也不知道你给/opt 和 /usr 下追加分区的作业是否正确?
你先看看这2个目录下 现在有数据吗?