Stack Exchange Network

Stack Exchange network consists of 174 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]

The concept that software will look in several folders, in the order stored as the path, to find which programs should be allowed to run.

0
votes
3answers
61 views

How to set relative directory to PATH variable, and run scripts in relative directory globally

I have some some scripts in a git project I wan to access globally, so I add the relative path to the scripts folder like so vim ~/.bash_profile export PATH="~/git/scripts/:$PATH" source ~/....
4
votes
2answers
43 views

Is there any way to get a log of all the recently installed files and their respective folder paths and source directories?

I recently installed an open source game. The file type is .pkg . Now, during installation the installer asked for permission to access the system UI server. I didn't knew the reason behind it so I ...
2
votes
1answer
70 views

What is the difference between HFS path and alias path?

This was brought up in a comment from another question/answer and I was curious what is the difference between an HFS path and an alias path. My understanding they were the same.
1
vote
2answers
28 views

trouble installing cmake

I need to install cmake for school. I have tried using the source code but don't really understand where I should unpack it and how to add it to my path. I also tried the .dmg file but the command ...
1
vote
0answers
28 views

Why do I keep getting this error message: “git was not detected on system path”

I'm not familiar at all with coding or using rstudio since this is the first semester im taking it. Basically everything was working fine, but when i updated to mojave, this error started popping up ...
1
vote
1answer
28 views

Mac exectuable only starts with ./name even when $path set

I'm trying to install Mongo but having trouble with the $PATH var in MacOS. Following the guidelines. My $PATH is set in .bash_profile: export PATH=/Users/evl/dev/mongodb/bin⁩:$PATH which works: ...
1
vote
2answers
999 views

Problem with displaying file path in Finder's Get Info -> Where

I occasionally need to check some file's location and copy it to the clipboard. I used to use Finder -> Cmd-I then I used to copy the content of "Where" section. Ever since updating to macOs Mojave, ...
1
vote
1answer
17 views

Create an hardlink across storage device (or alternative solutions)

I have named my secondary SSD with a name with a space in it - "My SSD", and have been using it for many years with multimedia applications without any problem. Part of my media library with thousands ...
0
votes
3answers
96 views

Running `nano` uses the old nano(2.0.6) even though nano 3.0 is installed

I installed nano 3.0 with brew install nano, but when I run nano --version, it shows version 2.0.6, which is what came with macOS. Screenshot: echo $PATH also shows that /usr/local/bin is listed ...
3
votes
2answers
86 views

Difference between filename and . filename in macOS terminal

I'm newbie to MacOS. (I'm using mac OS high sierra 10.13.6) I installed a software. They said to initialize the software by . /path/setsas.sh I give no thought to . and space, so I just ran path/...
0
votes
0answers
128 views

How to change to the default $PATH in mac OS, and uninstall anything that changed my path?

I have been tinkering with things like git, mono, x11, python, and homebrew on mac. I am a noob and have no idea what I actually installed on my mac and how it changed my system. This concerns me from ...
0
votes
0answers
43 views

Removing directories from PATH

I am trying to run rkhunter, but it is giving me this output: stack/security/rkhunter-1.4.6 ➜ sudo rkhunter --check Password: Invalid BINDIR configuration option: Invalid directory found: ~/.dotnet/...
2
votes
3answers
144 views

Automator: Service to list File Paths of selected items, into Text File

How can this Automator Service for Finder be created? I'd like to be able to use Finder's Context menu (by right-clicking a Finder item) to run a Service that gets the file paths of the selected ...
4
votes
2answers
220 views

How to get an application executable path from Terminal

In macOS, applications can be launched from the command line with open -a < application name>. I would like to know if there is a command that returns the executable within the application ...
1
vote
2answers
82 views

Adding a new directory to PATH varibale

What is the de-facto way to export a binary/executable to my global PATH? I have seen different answers to this, but I am looking for the best answer. Basically, if I go on Github and download a ...
3
votes
2answers
75 views

Path Variable Limit

Is there a character limit on how long your PATH variable can be on macOS? Or is there a limit in terms of the amount of binaries you can reference in your path?
2
votes
1answer
1k views

Cannot run refind-install from Recovery because “/usr/bin/env: bad interpreter”

I have managed to change the present working directory to the folder containing downloaded rEFInd files. I have booted to Recovery Mode. The refind-bin-0.11.3 folder was downloaded to my Downloads ...
4
votes
1answer
384 views

Add Environment Variable to PATH

I am new to the Apple "eco system" and I am trying to setup my environment variables for local development. Here is what I have in my ~/.bash_profile (simplified for brevity): export PATH="$...
2
votes
1answer
84 views

How can I determine which paths are required?

I am using Mac OS X Snow Leopard 10.6.8. My Mac has several volumes with OS X and each volume has several users. I wish to minimise the work required to ensure that my paths are adequate both for ...
2
votes
1answer
57 views

mdfind -onlyin wildcard without pipe

Can -onlyin contain wildcards? mdfind pattern -onlyin '*bin' I know this works: mdfind pattern | grep bin
2
votes
1answer
76 views

Copy full path of an open file

I have a file open in Preview.app. I can easily view the full path for the same by ⌘ + clicking on the file proxy icon (the icon shown besides the filename in Preview's title bar). How do I copy ...
0
votes
3answers
63 views

Software uninstalled from brew still on $PATH

I've uninstalled software from brew (as I want to use a different version), using MacOS High Sierra 10.13.1 brew uninstall bowtie2 And downloaded the software from SourceForge instead, then copied ...
2
votes
1answer
58 views

Restore path to be read from /private/etc/paths

I used the how to from https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html to install AWS CLI on macOS. After executing command source ~/.bash_profile it seems that my default ...
2
votes
1answer
92 views

Path bar High Sierra doesn't work with search results on SMB fileserver

Yosemite High Sierra Hi there! At our Prepress department I’ve updated some iMacs from Yosemite to High Sierra. When I search in Yosemite on the SMB fileserver for a specific file, I see after a ...
3
votes
1answer
320 views

When I type 'echo $path' in Terminal, I see only a blank line - why?

I know I have a $path variable. If I type 'env' or 'set' at the Terminal command line, I can see what's in the $path variable - along with lots of other extraneous stuff. But if I just type 'echo $...
2
votes
0answers
57 views

path difference on script vs in shell

Why is the output of $PATH different when in a script vs when running $PATH from the terminal? Even for a minimal script like this: #!/bin/bash echo $PATH it will not match what I get when typing in ...
1
vote
1answer
229 views

Deleting a line from Bash profile

So using terminal I typed in: nano .bash_profile I then have access to the following bash_profile : GNU nano 2.0.6 File: .bash_profile ...
2
votes
1answer
144 views

Force terminal to use binary from a different path

I have installed pandoc using homebrew and the Anaconda python distribution using pyenv. I've just found that Anaconda comes with its own pandoc binary and since the pyenv shims come before homebrew ...
0
votes
1answer
2k views

Changed my PATH to have /usr/local/bin ahead of /usr/bin and now pip isn't found

I was following this guide to get Python 3 setup, which recommended changing the PATH variable such that "# If you still see 2.7 ensure in PATH /usr/local/bin/ takes pecedence over /usr/bin/". I put ...
2
votes
1answer
570 views

Not a valid identifier upon terminal startup

I am getting this line each time I open my terminal. Everything else seems to be working ok but I would like to get this fixed since I don't think it is a good sign. Last login: Mon Feb 19 09:21:05 ...
2
votes
1answer
177 views

How to revert launchctl PATH to defaults?

There are many questions and commentary about using launchctl setenv PATH /path/to/include in order to have GUI apps inherit user-specified paths. I did this about four years ago, and the changes I ...
0
votes
0answers
23 views

Customize path name for easier use cd [duplicate]

I am currently working on a project which involves working on files in two different directories, both with very long path names. I want to make some kind of "terminal shortcut" (apologies for not ...
2
votes
2answers
576 views

How can one use /etc/paths.d to add a path with spaces in it to $PATH?

I recently installed VMware Fusion 10 on a Mac running macOS 10.12.6. After doing so, my bash PATH is broken. I traced the problem to a /etc/paths.d path file that Fusion installed; it contains the ...
2
votes
1answer
667 views

Missing /usr/local/sbin directory in the /etc/paths file

Why doesn’t the /etc/paths file include the /usr/local/sbin directory on macOS? $ cat /etc/paths /usr/local/bin /usr/bin /bin /usr/sbin /sbin I would have expected: $ cat /etc/paths /usr/local/bin /...
1
vote
0answers
510 views

Terminal OS X export command not working, cannot set new variable/pathway

I'm trying to set a variable, e.g. BIN=../../../../bin but I get BIN=../../../../bin: Command not found. The same for export BIN export: Command not found. It seems that I can't edit the path ...
4
votes
1answer
378 views

Convert a PC path to Mac path with AppleScript

I am a lone Mac user in a company that uses PCs...I often get file paths that I need to manually navigate. I have found some scripts, but they don't seem to be working for me. I'd like to be able to ...
7
votes
4answers
273 views

Get/Copy current Excel file's path

When in Windows 10 or in Windows 7, if I have an Excel file open and I want to know the path to the file I can use the ‘open current file in explorer’ button and it opens that file in the Windows ...
1
vote
1answer
102 views

Accidentally deleted /etc/paths

I had recently messed up my $PATH variable so I thought if fixing it by removing the /etc/paths but I found out online solutions to fix the $PATH variable by just editing the ~/.bash_profile so I ...
1
vote
1answer
639 views

Homebrew (unlike Macports) does not put programs ahead of system's

Macports inserts /opt/local/bin/ ahead of /usr/bin in the path, and so if the same program exists in both folders, the Macports-installed one takes precedence. I'm unclear on how Homebrew manages ...
1
vote
0answers
345 views

how to set node path in at /usr/local/bin using nvm

I have installed node using nvm first time and now when I run which node in terminal it gives me /Users/username/.nvm/versions/node/v6.11.4/bin/node but what I need that node path must be at /usr/...
1
vote
0answers
49 views

How to set the Screenshot directory with Jamf?

I'm using Jamf to configure my companies MacBooks and just recently got the request from Management, that every screenshot taken should be placed in a special Directory. For now, the only thing I ...
2
votes
0answers
42 views

Where do I find what's all affecting my $PATH?

When I echo $PATH I get: /Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/arukaj/Library/Android/sdk/platform-tools/:/Applications/XAMPP/...
0
votes
0answers
71 views

What prevents using .bashrc to initialize Terminal?

A few months ago, I made it easier to run scripts I'd written by creating a .bashrc file. It worked for a while, but it has not worked in a few weeks. As the Terminal snippet below shows, the file ...
1
vote
3answers
93 views

Use incomplete file path in terminal

In terminal is there a way for Terminal to guess a file based on an incomplete file path? For example: Instead of /Users/me/foo1/foo2/foo3/foo4/TargetFile, is there a way to just do /foo3/foo4/...
3
votes
1answer
79 views

Correct Sierra 10.12.5 file paths to Spotlight and SpotlightNetHelper files to be blocked with Little Snitch?

The article belowmentions using LittleSnitch for blocking Spotlight and SpotlightNetHelper: Spotlight makes repeated http requests It includes two screenshots. The first image shows two separate ...
0
votes
1answer
855 views

How to export to $PATH permanently because .bashrc file doesn't exist in $HOME directory

I am trying to figure out macOS and want to install Composer which was not a problem....but I need the Laravel and Symfony installer and in the documentation it says that I need to export the variable ...
3
votes
1answer
92 views

Copy pathname from Finder with tilde (~/) instead of absolute home directory

Since OS X El Capitan, right-clicking on a file in Finder while pressing "Option" shows a menu function Copy "File.txt" as Pathname. I wonder if I can replace the absolute path of the home directory ...
3
votes
2answers
4k views

Locate long file paths on external drive with terminal

I need to move a large volume to a new raid server that's PC formatted. However I have a couple paths and filenames that are interrupting this process. I would just like to know how to use the ...
1
vote
1answer
1k views

My terminal path in macOS SIerra is messed up

Few months ago, I was trying to download pygame on mac. It was very difficult but I finally did it through terminal using bash. But after the download, I think there was some change on default path ...
2
votes
2answers
689 views

Terminal problem: “-bash: $: command not found”

I'm trying to start learning Swift and when I use the terminal line $ export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}" it gives me -bash: $: command not found ...