[Bug 609146] Re: /usr/bin/which and /usr/bin/xargs do not find commands in $HOME/bin

Petr Gladkikh 609146 at bugs.launchpad.net
Mon Jul 29 12:03:09 UTC 2013


This bug affects me. which does not find any programs in dirs starting
with '~' however bash starts them with no problem.

Ubuntu release : "Ubuntu 13.04"
uname -a : Linux the-host 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
My $PATH: 
/home/petr/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:~/bin:~/opt/apache-maven-3.0.5/bin:~/opt/adt-bundle-linux-x86_64-20130219/sdk/platform-tools/:~/opt/adt-bundle-linux-x86_64-20130219/sdk/tools/:~/opt/android-ndk-r8e/:~/opt/bin/

Path for '~/bin' is actually duplicated by '/home/petr/bin' here so it works. But "which" does not show programs from any of 
~/opt/apache-maven-3.0.5/bin
~/opt/adt-bundle-linux-x86_64-20130219/sdk/platform-tools/
~/opt/adt-bundle-linux-x86_64-20130219/sdk/tools/
~/opt/android-ndk-r8e/
~/opt/bin/

** Changed in: debianutils (Ubuntu)
       Status: Expired => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debianutils in Ubuntu.
https://bugs.launchpad.net/bugs/609146

Title:
  /usr/bin/which and /usr/bin/xargs do not find commands in $HOME/bin

Status in “debianutils” package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: debianutils

  I'm a little bit at loss with this problem and don't know where to
  start debugging it. My $PATH is
  PATH='~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
  but neither 'which' nor 'xargs' find executable shell scripts in
  $HOME/bin. However, the bash magically 'knows' about these commands
  and can execute them. Bash-completion with <TAB> works for them as
  well. So I suppose that both which and xargs are somehow broken.
  However, 'which' is able to find commands in /usr/bin, /usr/sbin, /bin
  and /sbin. So this is very strange, looks as if 'which' and 'xargs'
  ignore the current $PATH.

  I would appreciate all help with this.

  Thanks.

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: debianutils 3.2.2
  ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
  Uname: Linux 2.6.32-23-generic x86_64
  NonfreeKernelModules: nvidia
  Architecture: amd64
  Date: Fri Jul 23 23:30:01 2010
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_AU.UTF-8
   SHELL=/bin/bash
  SourcePackage: debianutils

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debianutils/+bug/609146/+subscriptions




More information about the foundations-bugs mailing list