linux执行 “source /etc/profile” 时提示
“bash: rt: 未找到命令... 相似命令是: 'tr' ” 但是在profile中找了半天没发现“tr”,下面是源码 ,请哪位大神帮忙看看!!!万分感谢~~
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.
pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}
if [ -x /usr/bin/id ]; then
if [ -z "$EUID" ]; then
# ksh workaround
EUID=`/usr/bin/id -u`
UID=`/usr/bin/id -ru`
fi
USER="`/usr/bin/id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
fi
HOSTNAME=`/usr/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
export HISTCONTROL=ignoreboth
else
export HISTCONTROL=ignoredups
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
# By default, we want umask to get set. This sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
umask 002
else
umask 022
fi
for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done
unset i
unset -f pathmunge
for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do
这里的脚本 可能带了rt 命令 去看看 ,也只有这里有可能有了
多谢老铁,我也是找了所有的,最后在redis.sh上找到的
root@localhost profile.d]# ll
总用量 88
-rw-r--r--. 1 root root 771 4月 11 2018 256term.csh
-rw-r--r--. 1 root root 841 4月 11 2018 256term.sh
-rw-r--r--. 1 root root 1348 4月 27 2018 abrt-console-notification.sh
-rw-r--r--. 1 root root 660 6月 10 2014 bash_completion.sh
-rw-r--r--. 1 root root 196 3月 25 2017 colorgrep.csh
-rw-r--r--. 1 root root 201 3月 25 2017 colorgrep.sh
-rw-r--r--. 1 root root 1741 4月 11 2018 colorls.csh
-rw-r--r--. 1 root root 1606 4月 11 2018 colorls.sh
-rw-r--r--. 1 root root 80 4月 11 2018 csh.local
-rw-r--r--. 1 root root 375 12月 12 16:55 flatpak.sh
-rw-r--r--. 1 root root 1706 4月 11 2018 lang.csh
-rw-r--r--. 1 root root 2703 4月 11 2018 lang.sh
-rw-r--r--. 1 root root 123 7月 31 2015 less.csh
-rw-r--r--. 1 root root 121 7月 31 2015 less.sh
-rw-r--r--. 1 root root 1202 8月 6 2017 PackageKit.sh_
-rw-r--r--. 1 root root 100 12月 10 17:10 redis.sh
_-rw-r--r--. 1 root root 81 4月 11 2018 sh.local
-rw-r--r--. 1 root root 105 4月 11 2018 vim.csh
-rw-r--r--. 1 root root 269 4月 11 2018 vim.sh
-rw-r--r--. 1 root root 2092 9月 4 2017 vte.sh
-rw-r--r--. 1 root root 164 1月 28 2014 which2.csh
#
**export** REDIS_HOME=/usr/local/redis
export PATH=$PATH:$REDIS_HOME/bin
#source /etc/profile.d/redis.sh
~
~
~
source /etc/profile bash :rt:未找到命令 相似命令是tr 该怎么办