Questions tagged [path]
218 questions
10
votes
6 answers
Prune duplicate entries from PATH variable
I modify my .bashrc frequently and then source it. However, when I have things like
export PATH="~/bin:~/perl5/bin:$PATH" in my file, then the PATH environment variable grows every time I source the file.
For example, the first time .bashrc is…

Christopher Bottoms
- 297
- 2
- 12
9
votes
3 answers
Override path to binary for particular user
My question seems to be trivial but I didn't manage to find anything helpful in internet.
I have a binary in
/urs/bin/binary
but it is outdated and newer version is available on some mount for example
/mount/new_version/binary
An there's a bash…

Viktor Stolbin
- 211
- 1
- 2
- 9
9
votes
1 answer
Can't find binary, but path included in $PATH
So I tried to install Mercurial on Ubuntu 10.04.
First I used the ppa repo, but got a pythonpath error, which I gave up on.
Next try was install from source, everything went well, except it can't find hg:
$ hg
-bash: /usr/bin/hg: No such file or…

floorish
- 253
- 5
- 9
9
votes
2 answers
IIS 7.5 (Express) applicationhost.config: Can a virtualDirectory's physicalPath be a relative path?
I'm configuring a site in applicationhost.config for IIS 7.5 Express:
…

stakx
- 195
- 1
- 7
9
votes
3 answers
why can't macports find make
I am trying to run macports like thus:
port install php5
When I do so, however, I get this error:
Error: Unable to open port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or…

GeoffreyF67
- 497
- 2
- 7
- 14
8
votes
1 answer
PATH issues for init.d scripts on startup
I have a simple script that starts up a unicorn instance (on Ubuntu 12.04LTS).
#!/bin/sh
case "$1" in
start)
echo "starting"
cd /path && bundle exec unicorn -c /path/config/unicorn.rb -D -E production
;;
stop)
…

Peterdk
- 183
- 1
- 1
- 6
7
votes
1 answer
Command to refresh binary paths in CentOS?
This is probably really easy and I just can't seem to find it.
I'm moving binaries around between /usr/bin and /usr/sbin, and even though both folders are in my $PATH, moving one binary to the other causes the system to continuously look for it in…

Locane
- 429
- 1
- 8
- 20
7
votes
2 answers
How to change back to previous path quickly?
This is a basic linux question I think, but I really want to know.
For example, currently I am in /usr/bin:
[x@localhost bin]$ pwd
/usr/bin
[x@localhost bin]$ cd /
[x@localhost /]$
Now I want to go back to previous path /usr/bin, how to do that…

Freewind
- 231
- 3
- 10
6
votes
1 answer
remount /tmp for the current shell
I have a command which is hard-coded to use /tmp as its working directory.
/tmp is rather small, and the command is certain to fill it up, which will cause problems for other system processes.
I can't modify the command, so I would like to remount…

bryan_basho
- 91
- 1
- 5
6
votes
3 answers
Windows: How do I add a program to the system's path environmental variable from the command line?
I'm looking to permanently add a directory to the %PATH% environmental available on a large number of Windows machines. Is there any way to do this from a command line (cmd) so I can script up a solution, rather than having to use GUI on dozens of…

HopelessN00b
- 53,795
- 33
- 135
- 209
6
votes
2 answers
pkg-config on Mac Doesn't find Libraries
I have been installing a bunch of libraries lately from the GNOME sources on Mac. They use pkg-config.
Every time I run a configure, it complains that it can't find library XYZ, which I installed to /usr/local/lib. The only way I can complete the…

Ryan Rosario
- 225
- 2
- 9
5
votes
3 answers
Why does 'ansible -a "env"' return a different environment PATH than my user?
When I ssh into a remote server and run env I get back the following PATH:
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myusername/bin
In contrast, when I execute the ansible command ansible -a…

Pretzel
- 103
- 1
- 9
5
votes
1 answer
Ansible become_user not picking up path correctly
Here's the code showing what I believe is a problem:
# Debugging path problems with sudo
---
- hosts: webservers
remote_user: root
tasks:
- name: echo path
command: echo $PATH
register: output
changed_when: False
- name: display…

Joshua Grigonis
- 157
- 1
- 9
5
votes
1 answer
mklink to network share or UNC path or Mapped Drive?
Are there performance or permission or other considerations to think about when using a mklink path to a network share versus just a straight UNC path (or mapped drive for that matter).
For example, can these three ways of accessing a network…

matt wilkie
- 481
- 4
- 12
- 28
5
votes
2 answers
Preventing bash tab completion of an environment variable with a FS path value from removing the environment variable name
Friends,
I am using GNU bash as my shell on Linux:
$ bash --version
GNU bash, version 4.2.45(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later…

Sara Jones
- 53
- 2