PATH strange behaviour
- version : 3.1.17(2)-release (i486-slackware-linux-gnu) - description : Strange behaviour ; second time I have it. I removed an old apache package (1.3, /usr/sbin/httpd) and make;make-installed a new one (/usr/bin/httpd). Here is the transcript of what appened then. [EMAIL PROTECTED]:/usr/bin# env | grep PATH MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/java/man:/usr/share/texmf/man PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/share/texmf/bin PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/opt/kde/lib/pkgconfig [EMAIL PROTECTED]:/usr/bin# ls -l httpd -rwxr-xr-x 1 root root 643348 2007-08-03 15:49 httpd* [EMAIL PROTECTED]:/usr/bin# ls -l /usr/sbin/httpd /bin/ls: /usr/sbin/httpd: No such file or directory [EMAIL PROTECTED]:/usr/bin# whereis httpd httpd: /usr/bin/httpd /usr/include/httpd.h /usr/man/man8/httpd.8 /usr/share/man/man8/httpd.8 [EMAIL PROTECTED]:/usr/bin# httpd -v -bash: /usr/sbin/httpd: No such file or directory [EMAIL PROTECTED]:/usr/bin# ./httpd -v Server version: Apache/2.2.4 (Unix) Server built: Aug 3 2007 15:46:58 [EMAIL PROTECTED]:/usr/bin# sh [EMAIL PROTECTED]:/usr/bin# httpd -v Server version: Apache/2.2.4 (Unix) Server built: Aug 3 2007 15:46:58 [EMAIL PROTECTED]:/usr/bin# ls -l /usr/sbin/httpd ls: /usr/sbin/httpd: No such file or directory [EMAIL PROTECTED]:/usr/bin# env | grep SHELL SHELL=/bin/bash [EMAIL PROTECTED]:/usr/bin# /bin/bash --version GNU bash, version 3.1.17(2)-release (i486-slackware-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. [EMAIL PROTECTED]:/usr/bin# ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: PATH strange behaviour
On Fri, Aug 03, 2007 at 04:32:10PM +0200, J?r?my Herv? wrote: > - version : 3.1.17(2)-release (i486-slackware-linux-gnu) > - description : Strange behaviour ; second time I have it. I removed > an old apache package (1.3, /usr/sbin/httpd) and make;make-installed a > new one (/usr/bin/httpd). Here is the transcript of what appened then. > > [EMAIL PROTECTED]:/usr/bin# env | grep PATH > MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/java/man:/usr/share/texmf/man > PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/share/texmf/bin > PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/opt/kde/lib/pkgconfig > [EMAIL PROTECTED]:/usr/bin# ls -l httpd > -rwxr-xr-x 1 root root 643348 2007-08-03 15:49 httpd* > [EMAIL PROTECTED]:/usr/bin# ls -l /usr/sbin/httpd > /bin/ls: /usr/sbin/httpd: No such file or directory > [EMAIL PROTECTED]:/usr/bin# whereis httpd > httpd: /usr/bin/httpd /usr/include/httpd.h /usr/man/man8/httpd.8 > /usr/share/man/man8/httpd.8 > [EMAIL PROTECTED]:/usr/bin# httpd -v > -bash: /usr/sbin/httpd: No such file or directory > [EMAIL PROTECTED]:/usr/bin# ./httpd -v > Server version: Apache/2.2.4 (Unix) > Server built: Aug 3 2007 15:46:58 > [EMAIL PROTECTED]:/usr/bin# sh > [EMAIL PROTECTED]:/usr/bin# httpd -v > Server version: Apache/2.2.4 (Unix) > Server built: Aug 3 2007 15:46:58 > [EMAIL PROTECTED]:/usr/bin# ls -l /usr/sbin/httpd > ls: /usr/sbin/httpd: No such file or directory > [EMAIL PROTECTED]:/usr/bin# env | grep SHELL > SHELL=/bin/bash > [EMAIL PROTECTED]:/usr/bin# /bin/bash --version > GNU bash, version 3.1.17(2)-release (i486-slackware-linux-gnu) > Copyright (C) 2005 Free Software Foundation, Inc. > [EMAIL PROTECTED]:/usr/bin# Well, that's expected behaviour. bash remembers the full path name for commands executed. In this case it has remembered the location /usr/sbin/httpd for the httpd command. You're update has removed it, but bash doesn't know it's gone. The new shell you executed starts with an empty hash. You can use hash -r to force bash to forget it. Sven -- Sven Wegener Gentoo Developer http://www.gentoo.org/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: PATH strange behaviour
"Jérémy Hervé" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED]:/usr/bin# httpd -v > -bash: /usr/sbin/httpd: No such file or directory "hash -r" will fix that. See "help hash" and "man bash" for details. paul ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: PATH strange behaviour
Ha... Ok, Ok... Thanks you, Sven, Paul, Bob for your answers ; I'll thought it was a bug. I think I must use my last days of holidays learning to read... Excuse-me again ! I will wake-up smarter tomorow morning :D Regards, Jérémy ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
BASH completion problem
i use Arch GNU/Linux and BASH is my login shell. i have also installed "bash_completion" package but sometimes BASH tab-completion works and sometimes not. most of the times the BASH tab-completion doe snot work and just throws the frustrating beep on me (form my cabinet). at the same time ZSH has no problems with tab-completion what can be the problem ? this is some output from my terminal: [EMAIL PROTECTED] ~] $ shopt cdable_vars off cdspell off checkhash off checkwinsizeoff cmdhist on dotglob off execfailoff expand_aliases on extdebugoff extglob on extquoteon failgloboff force_fignore on gnu_errfmt off histappend off histreedit off histverify off hostcompleteoff huponexit off interactive_commentson lithist off login_shell on mailwarnoff no_empty_cmd_completion off nocaseglob off nocasematch off nullgloboff progcompon promptvars on restricted_shelloff shift_verbose off sourcepath on xpg_echooff [EMAIL PROTECTED] ~] $ set -o allexport off braceexpand on emacs on errexit off errtraceoff functrace off hashall on histexpand on history on ignoreeof off interactive-commentson keyword off monitor on noclobber off noexec off noglob off nolog off notify off nounset off onecmd off physicaloff pipefailoff posix off privileged off verbose off vi off xtrace off [EMAIL PROTECTED] ~] $ [NOTE: i deduce the fact that BASH is my login shell because BASH reads customisations i made from "~/.bash_profile" but not from "~/.bashrc". also i see in "chsh" BASH as my login shell] -- http://arnuld.blogspot.com/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: PATH strange behaviour
Paul Jarc wrote: > Jérémy Hervé wrote: > > -bash: /usr/sbin/httpd: No such file or directory > > "hash -r" will fix that. See "help hash" and "man bash" for details. There is also checkhash. shopt -s checkhash In man bash: checkhash If set, bash checks that a command found in the hash table exists before trying to execute it. If a hashed command no longer exists, a normal path search is performed. Bob ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash