Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [path]

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.

1
vote
1answer
37 views

Portable way to run command without PATH from bash script

cron calls my bash script (it's a backup script) with a very sparse PATH of /usr/bin:/usr. As a result, while a line like lvcreate --size 1G --snapshot ... works just fine when I run the script from ...
1
vote
1answer
32 views

How to check $PATH for installed software in a bash script?

Recently one of my bash scripts failed because cmake and zip / unzip were not installed on a system. What would be a convenient way to check for installed packages in $PATH env? I would like to ...
1
vote
2answers
39 views

Is it safe to add new python version to PATH?

Is there any danger to adding a new version of python to PATH? i.e. will some important system programs break? Suppose this is without deleting the old python2, but effectively changing the command "...
0
votes
1answer
40 views

Whether wild card symbol can be added to path variable?

Scenario: Parent folder contains, many sub-folders (say in a few hundreds) containing executables or source programs. Say, parent folder, bin contains many sub-folders, mod1, mod2, ... modn (for ...
0
votes
1answer
36 views

“$PATH” being exported as literally “$PATH” [closed]

So in a bash_config profile I have export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk export JAVA_PATH=$JAVA_HOME export PATH=$PATH:$JAVA_HOME/bin But rather than appending the PATH it is setting it ...
-1
votes
1answer
35 views

How to access external hard drive from Ubuntu Shell and Python code [duplicate]

I am running out of space in my local device. I have external hard disk. I want to point my python code to write to directory there. How can I know the full path for the hard disk? I tried to go to ...
0
votes
1answer
56 views

Trying to export a path from inside a bash script [duplicate]

I am trying to put my whole environment set up into a single bash file. I am only hitting one issue. When I try to export a new path from inside the file it is not setting the path in the environment ...
0
votes
1answer
39 views

Why is program not found in PATH [duplicate]

I've installed ipython inside virtualenv on my macOS. My PATH environment variable also shows virtualenv path to be at the beginning. which command also shows that ipython at the correct location. ...
1
vote
1answer
40 views

How to persist environment variables in ash, the Almquist shell?

How can I get ash to load some environment variables on startup? Just put them in /etc/profile /etc/profile is only read for login shells; what about non-login shells, as frequently pop up when ...
4
votes
1answer
152 views

Bash can't find scripts in $PATH [closed]

I'm setting up a completely new, fresh Ubuntu 16.04 Minimal system, and have run into a weird problem. Even after adding $HOME/bin to the $PATH, bash can't seem to find any of the scripts in it, at ...
12
votes
1answer
1k views

Executable file named 'test' is in $PATH but won't run

I have a file in $HOME/bin (before you ask, yes, it is in my path) called test which I've confirmed can be executed fine when I run it with the full path to the file. However, I get a really weird ...
1
vote
0answers
23 views

Make programs in /opt searchable from launcher

I've installed Telegram and I've the folder "tsetup.1.3.10", where executable files lay, into Download folder. I don't want my programs in Download folder, so I moved they in /opt folder. But, after ...
0
votes
0answers
30 views

Changing Path variable

I am not able to permanently change my PATH variable. I tried changing .bash_profile file but, the changes were reverted (however the .bash_profile file had the path which I wrote) when I closed the ...
3
votes
1answer
64 views

Remove executable from path [duplicate]

I have a script called teleport in my path. When I type tele and hit tab, I'd like for tab-completion to complete this to teleport. However, there's another program installed on my system: telepathy-...
6
votes
1answer
118 views

Adding path to .profile safely using a script

I want to add a directory to the $PATH environment variable through an install script. I have written a few programs, all present in one directory. They need a lot of other packages installed to run. ...
2
votes
1answer
38 views

cannot find package with running go build

root@kali:~/subfinder# go build main.go:15:2: cannot find package "github.com/subfinder/subfinder/libsubfinder/helper" in any of: /usr/lib/go-1.11/src/github.com/subfinder/subfinder/libsubfinder/...
1
vote
1answer
26 views

Messed up environment variables in Centos 7

When I am running my maven build I am getting this error: Error: JAVA_HOME is not defined correctly. We cannot execute /usr/bin/bin/java I have edited .bashrc, .profile, /root/.profile and /root/....
0
votes
3answers
284 views

Bash script with limited path

I'm trying to write my first bash script to essentially install a bunch of dependencies and then execute a script. I'm struggling debugging this with the user b/c I'm a dev which means I already have ...
0
votes
0answers
10 views

Can run the command when specify the path, but cannot run it by name although PATH points to it [duplicate]

I have the following setup: $ which pip3.7 /py36env/bin/pip3.7 $ sudo pip3.7 list sudo: pip3.7: command not found $ sudo /py36env/bin/pip3.7 list Package Version ------------------...
3
votes
2answers
318 views

Could PATH contain newlines?

It is known that a path could contain newlines in any of its components. Should we conclude then that the environment variable $PATH could contain newlines ? If so, how to split the $PATH into its ...
1
vote
1answer
42 views

Linux's command line behaviour (Ubunto/Deb) in running an executable file [duplicate]

@user-123:~$ Downloads/execfile-3.4/execfile @user-123:~$ @user-123:~$ cd Downloads/execfileparentdir-3.4/ @user-123:~/Downloads/execfileparentdir-3.4$ execfile execfile: command not found @user-123:~...
2
votes
2answers
56 views

Set $PATH as OpenLDAP attribute

I need to set $PATH for OpenLDAP users (CentOS6/7). Not in .profile, not in .bashrc on client machine, but as attribute in LDAP on the LDAP server so it is set whenever the user logs onto any host via ...
0
votes
1answer
50 views

Searching files in $PATH

I have some folders specified in my PATH environment variable. How do I list all the files in these folders?
0
votes
0answers
43 views

Include directory not found after installing xtensa compiler

I followed these steps to install ESP8266 SDK and Xtensa toolchain separatedly (make STANDALONE=n) on fresh Lubuntu LTS distro. The installation was successfull, I added $HOME/esp-open-sdk/xtensa-...
1
vote
1answer
29 views

How can I write out the path of 0 size files

How can I modify my query (below) to get the (absolute) path of all the 0 sized files within a directory? find ./ -size 0 -print
1
vote
1answer
22 views

“Right” way to deal with adding packages to path

I downloaded and installed the Haskell Platform. And It got installed (default) to /usr/local/haskell/ I want to add the binarys inside /usr/local/haskell/bin/ to my path. But I dont want (if ...
-3
votes
1answer
37 views

Gnu/Linux: Listing files, with certain characters in the file-name, while in a different directory

How do I list all files and directories in the /etc/ directory, which have one or more digits in its file-name, and save the output to a file, in the home directory. The output must have the full ...
0
votes
1answer
47 views

Is there a command that preloads `open()`, `fopen()`, etc. functions like `proxychains`?

I learnt that we can use LD_PRELOAD to preload open() function to fake a path to a process. I learnt it from here: Is it possible to fake a specific path for a process? I am wondering if there is a ...
1
vote
2answers
478 views

Whose PATH value is the default PATH value in a crontab file? [duplicate]

root's default PATH is $ sudo su # echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games After creating /etc/cron.d/myjob 35 * * * * tim ( date &&...
0
votes
2answers
254 views

Removing root slash with `-p1` and so forth [duplicate]

I understand that patch allows patching applications when some path components are removed. While -p0 argument will treat a path as is: /var/www/html/example.com -p1 will remove the root slash, so ...
0
votes
1answer
27 views

Run programs from a different set path

I already read many of the ways to run a program when it is installed in a different address than the $PATH. I have a different problem. On PC0, a set of packages (libraries and executables) were ...
0
votes
3answers
80 views

Cut path to first four directories

I have several projects where I have to use the same command. The projects always are in /home/[username]/public_html/[prjectname]/ I'd like to run this command from every directory of my projects, ...
0
votes
1answer
86 views

RHEL 7: Add PATH variables globally

Under my profile and the .bashrc file. I have added several environment variables. Example: export HADOOP_HOME=/app/hadoop-2.7.3 When I try to run any "hadoop" command I get command not found. ...
0
votes
1answer
95 views

Ubuntu 14.04.2 LTS: 'find' not found in PATH or not executable

I am trying to install some graphics libraries with the following command: sudo apt install jpegoptim optipng It however fails to run with stating the following: Reading package lists... Done ...
0
votes
2answers
36 views

Properly feed paths to executables in bash script

Hello all I have a text file (1.txt) that contains full paths to binaries which I need to execute a command (val_bin) for each path in the file. 1.txt Example: /source/ed/dev/ed/ab/ed_len/comercial/...
0
votes
2answers
673 views

Where is Cygwin set its PATH variable?

If I write echo $PATH in my Cygwin window (mintty) I get a list of paths. That list does not match the Windows Envirnonement variables list. I cannot find a file, where is the variable $PATH set. None ...
0
votes
0answers
31 views

How to modify bash completion for command names to match custom list only?

I want to customize bash completion on command names, such that matches are looked for in a particular list only. If I try the following: complete -E -W "foo bar" it works fine on an empty line, ...
4
votes
1answer
246 views

Installed program executable runs from wrong location

I installed parcellite in Ubuntu (downloaded from http://parcellite.sourceforge.net/) After installing from sources, sudo make install, I can see that it is installed at below location. However, ...
0
votes
2answers
41 views

Add directory to all PATH-like variables [closed]

Is there a function that can add a root folder to all path-like variables? At the moment I use this function: function prepend_paths() { ROOT_PATH=$(readlink -f $1) export PATH=$ROOT_PATH/bin:...
-1
votes
1answer
56 views

Ruby on Rails Routing Error [closed]

I am running ruby on rails on an Ubuntu Droplet and I am encountering the following error when I navigate to my domain name: Routing Error uninitialized constant HomeController Rails.root: /home/...
0
votes
1answer
34 views

updating PATH to work for every current working dir

Say I have this defined for PATH export PATH="./node_modules/.bin:${PATH}" does that mean that any process that uses PATH, will have a reference to node_modules/.bin from the current working dir?
0
votes
1answer
25 views

Command present in two locations and both locations are in PATH [duplicate]

I have this situation in which the same command/program (eg: myScript) is present in two locations, /usr/bin and /usr/local/bin. Both these locations are in the PATH. When I run $ myScript How do ...
0
votes
1answer
135 views

Systemd custom service doesn't read PATH

I am trying to run a Node.js app as a service in Debian 9. So, following some tutorials, I've made a service like that. [Unit] Description=bumer API Http Server [Service] PIDFile=/tmp/bumer-service....
1
vote
1answer
126 views

execl() is not executing a command without its absolute path

I have C program saved under /usr/sbin/. This program prints "Hello World" every two seconds. I can call/execute this program from any folder. When I write C program with system("a.out"); in it, it'...
2
votes
1answer
221 views

Command not found when run as sudo

I'm running centos7. I installed puppet. if I write puppet as a user, I get a proper output. If I write sudo puppet I get command not found. The really weird thing is, if I do sudo su - and become ...
2
votes
1answer
117 views

Bootable ISO vs. Partitioning

I would like to create a bootable Linux ISO on a USB drive under Debian 9. I found that the ISO is only bootable if it has been written to the disk /dev/XdY. If the ISO is written to a specific ...
1
vote
0answers
36 views

Windows PDF viewer interprets hyperlinks incorrectly from Linux converted PDF?

I am operating on a RPi Model 3B with Jessie OS and Python version 2.7.9. I am using XlsxWriter (ver1.1.0) to write an .xlsx file and then converting it to PDF using LibreOffice's conversion code, as ...
2
votes
4answers
430 views

Find exclude path containing specific files

I am trying to find all directories in a folder recursively while exclude all git submodules by excluding all path containing .git file. How could I do it? Explanation: .git file exists at the ...
2
votes
3answers
82 views

Find command that excludes paths listed in a file

I need to exclude a bunch of paths from a find command. For example: find "$(pwd)" -not \( \ -path "*/.git"\ -o -path "*/.git/*"\ -o -path "*/.vscode"\ -o -path "*/.vscode/*"\ -o -path "*/...
0
votes
1answer
44 views

How can I find exactly which files have been accessed after a command runs in tcsh?

how can I find which files tcsh reads to TAB complete the second word of a command, as opposed to the first word. I know I can just use whereis complete to see the path to *.1.gz file, but that is ...