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.

Filter by
Sorted by
Tagged with
1
vote
1answer
28 views

/usr/local/bin for OpenWrt

I’m attempting to add support for using Sublime Text and TextMate with files on the router: https://packagecontrol.io/packages/RemoteSubl. Essentially, the script needs to be added to the /usr/local/...
-1
votes
1answer
24 views

uninstalled program in PATH

I have uninstalled gnome-screenshot, but when I write gnome in terminal and tap TAB, it still suggests gnome-screenshot (and other gnome apps, but it's correct). If I want to use uninstalled gnome-...
0
votes
0answers
15 views

“Backups” (deja-dup): after installing duplicity 0.8 from source, “Backups” can't find it

When using "Backups" (a.k.a. deja-dup) - it doesn't find duplicity, although it's installed: I have been trying to backup using "Backups" (a.k.a. deja-dup), and it turns out that the current ...
0
votes
1answer
33 views

How to set PATH to symlinked directory in bash csh

I have the directory /data/bin and in my home directory is symlink /home/myuser/bin -> /data/bin I have set PATH into the /home/myuser/bin/ When /home/myuser/bin is the directory, the PATH works fine,...
0
votes
1answer
28 views

How can “which” find commands inside directories where I have no read permissions?

On my work PC, I noticed that the which command seems to be able to find executables in directories, that I have no read permissions for. $ export PATH=/usr/sbin:$PATH $ ls /usr/sbin ls: cannot open ...
1
vote
0answers
24 views

Performing job array by reading in file paths from a text file

I am trying to perform a job array using script below. #!/bin/bash --login #$ -cwd #$ -t 1-4 module load apps/bioinf module load apps/trimmomatic/0.36/noarch file=`awk "NR==$SGE_TASK_ID" ~/scratch/...
1
vote
1answer
27 views

Adding a directory to PATH to run scripts from subdir

I'm using Ubuntu and I'm trying to add a folder to my PATH that contains subfolders including my scripts. My folder paths are: /opt/tools/utils/my_script.sh /opt/tools/steps/my_script.sh Other ...
0
votes
1answer
28 views

real time global change for environment variables PATH

What is the best way to modify PATH and LD_LIBRARY_PATH so that it has a real time affect for any logged in user that does new terminal window in runlevel 5 {graphical.target}? This is on RHEL/CentOS ...
1
vote
1answer
82 views

create a folder from dynamic path location

I would like to create a folder which location is available in abc.csv file. abc.scv content the following fields id,path and file name we should read the file name and move the file in the path ...
22
votes
2answers
3k views

Does POSIX guarantee the paths to any standard utilities?

From C, what's the easiest way to run a standard utility (e.g., ps) and no other? Does POSIX guarantee that, for example, a standard ps is in /bin/ps or should I reset the PATH environment variable ...
0
votes
1answer
35 views

How do I fix the “processing-java: command not found” error in the terminal

I have installed processing-3.5.3 IDE but really want to use the Sublime text editor as my goto for processing sketches. What I have done so far: Install the "Processing" package in sublime. ...
1
vote
0answers
22 views

Set path for non shell user

I have installed Adopt OpenJDK version of Java. I set it up so all users will have JAVA_HOME set and that the bin folder for Java is in the PATH. However the software I installed afterwards that ...
1
vote
0answers
48 views

sudo root cannot find executable on path

I am on CentOS 7.5 and installing OpenJDK 11 from Adopt OpenJDK. It doesn't have an installer package so I am manually putting it in /usr/share. I then create the file /etc/profile.d/java.sh to set up ...
0
votes
1answer
84 views

how to check if MKL is installed and find it's path

Please help me out. it has been 3 hours that I am trying to install OSQP. I needed to install MKL. I downloaded the full package and installed it. but I don't know where is it and how I can check if ...
1
vote
1answer
33 views

Command in path not found [duplicate]

I've a command in the ~/.local/bin/ path (lets call it dog). Calling the command with the full path ~/.local/bin/dog works as expected . When I do which dog I get the expected ~/.local/bin/dog. When ...
0
votes
2answers
23 views

How to search for asset files in a PATH-like list of locations?

I want to be able to easily search through a list of possible asset file locations for particular files, using similar semantics to the way posix shells search for binaries along the PATH based on a ...
12
votes
1answer
603 views

What is the difference between $path and $PATH (lowercase versus uppercase) with zsh?

In FreeBSD 12, using the zsh shell, I noticed this difference when looking at $path (lowercase) versus $PATH (uppercase). echo $path /sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /...
1
vote
0answers
120 views

How do I get Rofi/Dmenu to read my $PATH?

I have a very similar issue to How to get installed application to be detected by rofi? - or rather a followup question. My question is, outside of symlinking, is there a way to export my path for ...
0
votes
0answers
39 views

Unable to execute bash scripts from within fish-shell

I have a collection of bash scripts that I have added to the PATH so that I can execute them from anywhere. export PATH=$PATH:~/<path>/<to>/<scripts> so along with ./<path>/&...
-1
votes
1answer
64 views

What is correct syntax to for loop variable in PATH?

I have to execute following loop: root1=path/to/root1 root2=path/to/root2 for i in {1..2}; do ${root${i}}; done It doesn't give desired output: path/to/root1 path/to/root2 Admin suggested ...
1
vote
0answers
41 views

parallel-ssh not appears in any path after pip installation

we installed the parallel-ssh but after pip successfully installation the command parallel-ssh not appears in any path where we are wrong? locate parallel-ssh which parallel-ssh /usr/bin/which: ...
0
votes
1answer
30 views

csh: Changing path in non-interactive login

I want this: $ ssh nopathcsh@lo 'echo $path' /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games To return this: /usr/bin /bin I have tried changing and ...
0
votes
2answers
67 views

Recursively replace path in a files in directory, except binary files

How to recursively replace strings (location path) in the files in directory, except binary files? I tried command find . -type f -exec sed -i 's/foo/bar/g' {} + but it replaces also strings in ...
1
vote
1answer
101 views

How to properly solve “git-gui: command not found” on Arch Linux?

The Arch Linux git package installs git-gui under /usr/lib/git-core/. This means git-gui cannot be launched directly from the terminal without specifying the full path: $ git-gui bash: git-gui: ...
0
votes
0answers
31 views

How can I override /bin in my PATH? [duplicate]

I would like to force default execution to happen from my home directory. However, regardless of what I try, it seems that the whereis utility finds programs to be in /bin instead of /home/user. E.g....
1
vote
1answer
58 views

$PATH: output showing malicious program?

I read that using echo $PATH, for NON-root users should resemble: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/username/bin: I read that using echo $PATH, for ROOT users should resemble: /...
0
votes
3answers
111 views

Assign $pwd to $PATH variable conditionally

I want to add my current working directory with its project-specific bin directories to my $PATH when the directories are present. So I added these lines to my .zshrc: [ -d "$(pwd)/vendor/bin" ] &...
0
votes
1answer
29 views

Use sed to append data BEFORE a closing double quote encasing a Path

I need to append the path /opt/dell/dcc of an application outside of the default path statement in /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/...
0
votes
1answer
43 views

Since aliases are not inherited, is there any alternative to exporting the executable on the PATH?

I am trying to setup a system to switch between bash versions on a Mac. I have this which works: change_bash_version(){ if test "$1" == "3"; then export PATH="$HOME/bash/versions/3.2.57:${...
0
votes
0answers
15 views

how does a system package know to look in the user python site-directory instead of the system python site-directory?

The virtualenv documentation 1 says: Using pip install --user is less hazardous but can still cause trouble within the particular user account. If a system package expects the system provided ...
0
votes
1answer
25 views

Specifying path to a file within a program command line

I am using a program called Diamond and I have a script that goes like this: cd /srv/scratch/myname/hello diamond blastp -d /srv/scratch/myname/goodbye/inputFile1.dmnd -q inputFile2.faa -o /diamond/...
0
votes
2answers
25 views

Build path name with variable as input to touch [duplicate]

I want to store a path I often use as an environment variable, then call this variable to construct a path name. $ mypath="~/local/bin/" $ newFile="${mypath}newFile.sh" $ echo $newFile ~/local/bin/...
0
votes
1answer
25 views

POSIX command for `which --all`, to list all on PATH not just first?

Many shells have an --all flag to which: --all, -a Print all matches in PATH, not just the first But which is not POSIX-compliant; shellcheck points us at command -v. command however has ...
0
votes
0answers
35 views

Why is my PATH so small when opening SSH session through python subprocess?

I'm currently working on a project that requires me to use a python subprocess to execute "i2cset" on a Raspberry Pi2 through SSH but my code keeps telling me that my Raspberry Pi can't find "i2cset". ...
0
votes
2answers
69 views

Confused about Configuring Linux Path Environment /etc/profile.d/*.sh being Executed Twice?

I am trying to set PKG_CONFIG_PATH to CentOS here are the code I tried export |grep PKG_CONFIG_PATH no output, normal... echo "$PKG_CONFIG_PATH" :/usr/local/lib/pkgconfig why there is output here??...
1
vote
2answers
65 views

Correcting PATH after dist upgrade?

After a dist upgrade (Debian 9 to Debian 10) some things stopped working. For example, iwconfig, losetup, ifconfig, poweroff, pm-hibernate. These commands work if I type the full path like /sbin/...
1
vote
1answer
47 views

how to avoid mounting directories with overcomplicated paths?

Background: I am accessing a remote directory like this: smb://serv.erNa.me/storage/directory/ Accessing it, is not an issue. Through the file manager I copy paste the path, press Enter, insert ...
2
votes
0answers
32 views

Add file to PATH only when in specific directory [duplicate]

Is it possible to make executable appear in the global search path when I am entering to the some specific directory and get it removed once directory changed again?
0
votes
1answer
42 views

Specifying a Shebang path in a shell script

I am running a VM with Ubuntu on it. In a very simple script I wrote I defined the shebang as: #!/bin/zsh However, zsh also exists in /usr/bin/zsh. Does it matter which path I use?
0
votes
0answers
20 views

Copy specific named directories, where content changed the last 24 hours

I can recursively find and copy all my test-directories (with content) of the current directory: find . -name test ! -path "./my_dest/*" -exec cp -r --parents {} /path/to/my_dest \; But now I want ...
-2
votes
2answers
709 views

Conan: Command Not Found

I'm using a RPI 3B uname -a returns: 4.14.98-v7+ #1200 armv71 OS is stretch gcc version is 4.9.3 I'm attempting to setup my RPi to be a BLE gateway as per this project on hackster.io. I executed ...
0
votes
0answers
48 views

Do programs added to PATH not work with the source tool?

I have mix added to my bash_profile like so: export PATH="$PATH:~/.mix" This gives me access to rebar, and it works correctly: chris$ rebar -V rebar 2.6.2 R15B03 20160628_123811 git 2.6.2 However, ...
1
vote
1answer
59 views

How to reset $PATH after accidentally setting it to something nonsense?

I'm on Mac OS X High Sierra. I was doing an scp command, repeated several times so I wanted to be clever and just set the variable $IMAGE for the image name and $PATH if I needed to add an extra path ...
1
vote
1answer
43 views

Does using ./ in paths make sense with common Unix tools?

Throughout the years I've been using ./ in front of absolute paths more and more. For example: mv ./file /target/ rm ./something/else # compared to mv file /target/ rm something/else I've seen it ...
0
votes
2answers
59 views

Script runs command fine, but fails when trying to save output to variable

I have a shell script with the following contents. I call it with ./script.sh. Echo successfully runs, but not when I try to save its output to a variable. The same is true for all commands I've ...
0
votes
1answer
18 views

After re-connecting hard disk, terminal commands stop working

The current working directors is, e.g. /media/username/ExtHDD/. When disconnecting and re-connecting that HDD, commands such as ls do not work properly anymore. $ -????????? ? ? ? ? ...
1
vote
1answer
81 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
43 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
242 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 "...
1
vote
1answer
140 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 ...