PATH (all upper case) is the name of an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are searched for.

learn more… | top users | synonyms

5
votes
5answers
20k views

Adding directory to PATH through Makefile

I'm having some trouble in exporting the PATH I've modified inside the Makefile into the current Terminal. I'm trying to add to the PATH, the bin folder inside wherever the Makefile directory is. ...
4
votes
6answers
21k views

Removing a directory from PATH

I'm trying to compile wxWidgets using MingW, and I have cygwin in my path, which seems to conflict. So I would like to remove /d/Programme/cygwin/bin from the PATH variable and I wonder if there is ...
1
vote
2answers
45 views

Find a folder excluding one

I would like to find a folder not named "STDF", then archive them. find /a/b/c -mindepth 1 -maxdepth 1 ! -path "STDF" -exec /usr/bin/gzip '{}' \; The above command is not working. Can someone ...
1
vote
1answer
1k views

CentOs 7 Python Issue “-bash: python: command not found”

I asked this at stackoverflow, but just realized it might be best here. If I need to delete it over there or should not have posted here, please let me know. I am still new to this site. Thanks in ...
0
votes
1answer
1k views

qmake error when installing PyQt5

I'm trying to install PyQt5 for python3 from source files. I install SIP correctly. Then when I want to prepare the make file for installing PyQt, I get this error: #python3 configure.py Error: /...
0
votes
1answer
37 views

Explain the output of realpath [closed]

I am trying to use the command line to return the absolute path to a file. I read that there are multiple ways to go about this, namely the realpath, readpath -f, and locate commands. None of these ...
0
votes
1answer
27 views

Is there such a notion as broadening where find searches?

I'm trying to identify redundant installations of the site package matplotlib in my python3.5 environment. A contributor to the library (GitHub issue) is advising that I use python3.5 -m site ...
7
votes
4answers
300 views

Execute a command where a file is found

How do I execute a command where a file is found? Consider I've an directory named testdir that contains the following: $ ls -R testdir/ testdir/: dir1 dir2 dir3 dir4 dir5 testdir/dir1: doc1.pdf ...
1
vote
2answers
37 views

Setting path environment variable for desktop launchers [duplicate]

I set a custom $PATH in ~/.bashrc with PATH=$HOME/.bin:$PATH. When I launch the geany from the terminal it is able to find my custom build tools that are located in $HOME/.bin. When I launch Geany ...
3
votes
2answers
4k views

trying to install curl with homebrew, getting “incompatible library version” for libcurl.4.dylib

I am on OSX 10.9.5. I would like to use a later version of CURL than what is bundled with OSX, but I do not want to remove the OSX binary just in case, so I wanted to opt to install it via homebrew. ...
0
votes
3answers
32 views

wget’s --output-document= option failed when contain ~ character

I wright a documentation so I prefer use long options because it’s self-descripting. --output-document= is more readable than his short equivalent -O. Then, I have to indicate a file in the home ...
7
votes
2answers
19k views

How to export LD_LIBRARY_PATH to all users and system services

I want to export LD_LIBRARY_PATH to system services and all users. System services are run before login, so .bashrc is not applicable. How to achieve this?
23
votes
4answers
13k views

Duplicate entries in $PATH a problem?

I source bashrc's of few of my friends. So I end up having duplicate entries in my $PATH variable. I am not sure if that is the problem for commands taking long to start. How does $PATH internally ...
-1
votes
2answers
66 views

gmake shell and PATH in a Makefile

Could anyone please explain why following: export PATH:=$(PATH):~/bin2 B:=$(shell PATH=$(PATH) testXq.sh) $(warning $(B)) Is working properly showing results of run of the ~/bin2/testXq.sh, while ...
9
votes
5answers
6k views

Find a file in the path without “which”?

I am (somehow) able to run a script: $ assemble.sh file ... [output] But which can't find it: $ which assemble.sh which: no assemble.sh in (/s/std/bin:/usr/afsws/bin:/opt/SUNWspro/bin:/usr/ccs/bin:...
1
vote
1answer
645 views

Editing the .profile file to access

I am trying to source my .profile file to easily access a directory of javatools. The bash code below seems like it should work but it does not. Any help troubleshooting this script would be very much ...
1
vote
4answers
31 views

discrepancy between path for binary and man page

Systems often have multiple versions of binaries and the one selected depends on the priority in $PATH. For instance, the system I am using has a couple version of sort: $ which sort ~/coreutils-8.25/...
1
vote
0answers
356 views

Python is unable to import OpenSSL

I created a virtual env for a matrix home server installation on a shared hoster. $ virtualenv -p python2.7 /home/tristank/venv/synapse $ source /home/tristank/venv/synapse/bin/activate I installed ...
1
vote
2answers
40 views

To Have Eclipse 4.5 in Path?

I downloaded the precompiled Eclipse Mars 4.5 in the official site here. Pseudocode Extract the tarball eclipse-jee-mars-2-linux-gtk-x86_64.tar.gz Move extracted Eclipse directory to some location ...
1
vote
1answer
89 views

Safe way to install .sh script in /usr/local/bin?

I want to include correctly the following script in Ubuntu 16.04. Code #!/bin/sh # http://tex.stackexchange.com/a/20886/13173 # $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $ # Convert ...
0
votes
2answers
88 views

find composer global install path as root

I have some php packages installed globally using php composer within a script sudo -u me composer global require "phpmd/phpmd" I want to find the path of these globally installed php packages. ...
1
vote
2answers
329 views

Bash commands not found

I use CentOS 7 and I install anaconda and some tools, after that some basic command like clear which not work. [zhilevan@localhost ~]$ clear bash: clear: command not found... when I echo $PATH I ...
1
vote
1answer
37 views

Does gnome-terminal modify PATH when invoking shell

I guess gnome-terminal might have modified PATH environ variable when invoking shell. Specifically, $HOME/.local/bin:$HOME/bin will always be appended to PATH. I did the following experiment to ...
1
vote
1answer
129 views

File Path problem

I am relatively new to Unix, so perhaps this is an extremely simple problem. Anyways, the problem is such: I am taking an online course and the professor typed: echo $path and got this result.......
0
votes
2answers
44 views

How to see and use the last paths used in Terminal? [duplicate]

I'm quite a newbe. I was wandering: is it possible to see the last paths used in terminal (bash, whatever.., I use a Mac), something like what you do with recent commands? I often use the terminal on ...
25
votes
13answers
10k views

Remove duplicate $PATH entries with awk command

I am trying to write a bash shell function that will allow me to remove duplicate copies of directories from my path environment. I was told that it is possible to achieve this with a one line ...
1
vote
3answers
64 views

ldd don't find path, How to add

i know this question isn't very new but it seems as if i didn't be able to fix my problem on myself. ldd generate the following output u123@PC-Ubuntu:~$ ldd /home/u123/Programme/TestPr/Debug/TestPr ...
2
votes
1answer
7k views

Unable to log in. xsession-errors file looks like it could be useful if I understood

I am unable to log in to my account, having recently installed Linux Mint. I had this problem with Ubuntu 13.10, and no amount of re-installations seemed to fix it. However, Mint gives me a very ...
0
votes
1answer
29 views

cron not working with commands symlinked in custom PATH

I have a script job.sh in /home/user/scripts, which is then symlinked to /home/user/bin/job. The custom binaries path has been included in .bashrc, so whenever I issue the command job param1 etc from ...
1
vote
1answer
14 views

Should I set PAGER environment variable, alias or symbolic link?

I noticed that when using aliases, some programs launch pager directly (either from PATH or through PAGER). I'd like to define default pager for all cases, not just when I type the command. Should I ...
3
votes
1answer
50 views

Is it possible to add a single executable, rather than an entire directory, to my $PATH?

I have XAMPP installed in OSX, and by default it prepends the path to its own bin directory (full of various utilities) to my $PATH variable: # Add path to XAMPP PHP version export XAMPP_PHP=/...
0
votes
1answer
23 views

Mess with an export PATH

I have tried to include INTEL PARALLEL COMPOSER to my .bashrc.But something went wrong.Now I can not use gedit or vi editor. milenko@milenko-HP-Compaq-6830s:~$ gedit .bashrc Command 'gedit' is ...
0
votes
1answer
59 views

PATH not getting exported from ~/.profile until manually sourced

I am trying to modify my PATH in ~/.profile: export PATH=$PATH:/opt/jdk1.8/bin echo "Path is exported." I will always login via SSH so that's why I have it in ~/.profile. I am using zsh (oh-my-zsh) ...
-1
votes
2answers
37 views

Command passed as an argument to another command is not found in PATH

Generally when a command appears as an argument to another command e.g. command1 command2 how is command2's executable searched for? Is it searched in $PATH? Is it specific to how command1 ...
1
vote
1answer
128 views

How to find files and act on them (find + exec)

I have downloaded about 3200 websites to the depth 2. So now I have one master folder (abc) that contains many folders, containing files for each website. So my folder abc contains 3200 folders and ...
0
votes
1answer
19 views

Pitfalls to symlinking python2.7 to python?

I have a CentOS 6.7 machine with the "system" python (2.6.6) installed from an RPM at /usr/bin/python. We installed an additional version installed from source (2.7.11) used for development purposes ...
1
vote
2answers
51 views

executable wrapper, run original executable from tail of PATH

There's an executable /usr/bin/foo which I and other scripts use but it misbehaves a bit so I made a Bash wrapper of the same filename in /usr/local/bin/foo where I fixed its misbehaviour. My PATH is /...
1
vote
2answers
45 views

PATH configuration no effect

I have a question regarding the PATH variable and ways to configure it. The question stems from the fact that the installation of a software package am dealing with comes with a bash script which is ...
2
votes
3answers
132 views

Bash one-liner to temporarily append path for chained commands without additional bash invocation?

Consider this: $ cd /tmp $ echo "echo YES" >> prog/myprog $ chmod +x prog/myprog $ prog/myprog YES $ myprog myprog: command not found I can temporarily modify PATH to call myprog by name like ...
0
votes
1answer
48 views

.zshenv not sourced on ssh login?

According to the docs .zshenv is sourced on all invocations of the shell, unless the -f option is set. It should contain commands to set the command search path, plus other important environment ...
0
votes
1answer
53 views

Why is bash not respecting ${PATH} and/or symlinks? [duplicate]

I am on OSX and installed Homebrew to get the GNU coreutils. I wanted gsort to be used instead of the preinstalled sort command so I created a symlink to gsort. My limited experience tells me that ...
0
votes
1answer
16 views

Change which ssh path

Good day all, My #which ssh returns /usr/local/bin/ssh however I would like to return /usr/bin/ssh. Both /usr/local/bin/ and /usr/bin/ are in the $PATH. How do I achieve this?
2
votes
3answers
24k views

Globally change path for all users, even in cron

We're setting up an SGE cluster with CentOS 6. My sysadmin is installing applications that are not installed via RPM (i.e. via other means like make install) should go in a non-standard directory, in ...
1
vote
2answers
73 views

Why some commands don't load user environment when executed with ssh? (while other do)

On a target machine (OS X El Capitan) I have brew in /usr/local/bin. When I try to get brew's path I get no result: # ssh vagrant@127.0.0.1 -p 2222 which brew # Troubleshooting: brew is in /usr/...
1
vote
3answers
48 views

.bashrc path problems

Can anyone tell me how to add a directory, say Idl, which contains many sub-directories to my IDL_PATH in .bashrc such that when I do source .bashrc, I will be able to it is able to run all the ...
0
votes
0answers
74 views

Command not found, only when used in a script

I installed pup on my mac using homebrew. When I try this command in my terminal cat index.html | pup -p 'div[class="quote"] text{}' >> quotes.txt it works fine but when I use it in a ...
0
votes
2answers
65 views

ls, mv, cp, cat, vi, command not found

I was trying to add a new path to my bashrc file but I have seemed to messed something up. after I $ source ~/.bashrc I no longer can use the commands ls, mv, cp, cat, vi, and probably others that I ...
387
votes
8answers
728k views

How to correctly add a path to PATH?

I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this. This way: export ...
0
votes
1answer
37 views

Editing the variable PATH

I want to start script just by typing script not the full path of the script for example ~/Desktop/name/script so i tried to edit variable PATH PATH="$PATH:~/Desktop/name" in the name folder i have ...
16
votes
2answers
1k views

What does ${PATH:+:${PATH}} mean?

I recently noticed the following in my cygwin profile, more precisely: /usr/local/bin:/usr/bin${PATH:+:${PATH}} What does it mean? Why is not just $PATH? Is this an 'if $PATH exists then add :$PATH'...