The path of a file is the location in our machine. Either a photo on the desktop or a configuration file in the folder Library, all files have an exact location. We may want to know it for various reasons, for example to run a certain terminal command, let’s see four ways to find it.
The Finder’s address bar
One of the easiest ways to find the path of a file is display the address bar of the Searcher. Once activated, it will show the path to any file or folder that we select, as simple as that.
To activate it, we simply open a Finder window and then activate Show route bar
The Finder title bar
We’re still in the Finder. In this case, we change the bar and go to the title bar. All Finder windows display your name at the top and this is where we can check the path to the folder where we are.
It’s that easy to do secondary click on the name itself. We will see that a drop-down menu appears that allows us to see, level by level, the exact location where we are. In fact, clicking on any of the items will bring us to the item.
The address copy menu
If we need to copy the address of a folder or file so that we can paste it somewhere, the best option is that copy the address directly from the context menu
We then click on any file or folder on our Mac. With menu open hold the Option (⌥) key. We will see that the option of To copy bECOMES Copy “filename” as the path. As simple as that.
The file information window
And we come to the last of the options that we are going to explain in this tutorial: the information window. This option is very simple. We just click on any folder or document and touch Obtain informations. Otherwise we can press Command (⌘) + I.
We will see the information window appear which in the section
I have to say that there are still a few ways to get the address of a file or a folder. One is to use Spotlight to get the route and then hold down the Command (⌘) key to see it, although it is often difficult to see it in its entirety if its length is considerable.
The other is to use Terminal: any file we drag into a Terminal window will show its address as text, a useful method, but a bit long, especially if it’s in the Finder where we’ve already located the file from which we want to get the information. It is clear that in macOS there are different ways to achieve the same goal and depending on exactly what result we want to achieve we can use one or the other.