How To Get File Path Mac
Apple
Sometimes you need to copy the exact location of a file in macOS through all nested folders (in the graphical user interface of the Finder) or directories (in the identical Unix hierarchy accessible via Terminal). This can be useful for deleting a file that requires intervention through the Terminal or for troubleshooting. I recently had to dig up some errant Dropbox entries for their technical support to figure out why syncing would never complete.
There are two tricks to find this full path from the Finder:
- Control- or right-click a file or folder. After the contextual menu appears (and only after), add the Option key and then select Copy "file name or folder name" as Pathname.
- OpenApplications > Utilities > Terminal. Drag the file into the Terminal. The path to the file or folder appears as a selection. In this method, the path name isescaped for Unix compatibility.
(Escaping means that any character that can't be typed directly as part of a path in a Unix command has a backslash in front of it to "escape" it. This translates as, "Treat the following character as exactly what it is instead of something different that Unix would interpret as not part of the path.")
In the first example above, the path would appear like:
/Users/glenn/Dropbox/Current Pubs/Macworld/Mac 911/Mac 911 July 2021/Mac 911 connect two Macs via WiFi.md
In the second in the Terminal (note the backslashes before every space):
/Users/glenn/Dropbox/Current\ Pubs/Macworld/Mac\ 911/Mac\ 911\ July\ 2021/Mac\ 911\ connect\ two\ Macs\ via\ WiFi.md
Ask Mac 911
We've compiled a list of the questions we get asked most frequently, along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we're always looking for new problems to solve! Email yours to mac911@macworld.com, including screen captures as appropriate and whether you want your full name used. Not every question will be answered, we don't reply to email, and we cannot provide direct troubleshooting advice.
Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
- Related:
- Mac
How To Get File Path Mac
Source: https://www.macworld.com/article/352788/how-to-find-the-path-of-a-file-in-macos.html
Posted by: watkinscriew1953.blogspot.com
0 Response to "How To Get File Path Mac"
Post a Comment