How to get the file path on MAC Four ways to get the file path on MAC

How to get the file path on MAC

Method 1: The easiest way 

Right-click a file or folder and select Show Profile

2 Find the location in the pop-up window, which is the path. The system before mac 10.10 is a normal path. Starting from 10.10, it is replaced by a small arrow. Note that the path does not contain the file name. After the reference is typed, pay attention to add Add the file name and extension.

Method 2: Using a browser

Open the browser and drag the file to the address bar of the browser

4 In this way, the file path can be obtained, but this method cannot directly obtain the folder path, that is, the path cannot be obtained by dragging the folder.

5 Method 3: With the help of the terminal

Like the browser, open the terminal first, drag the file or folder into the terminal

6 In this way, the path of the file or folder can be obtained, as shown in the figure

7 method four: once and for all method

First open the app

8 Find Automator, double-click to open

9 Then double-click the service

10 Press the icon to set the service to receive the selected file or folder, located in Finder

11 Find Copy to Clipboard (Copy to Clipboard) in the resource library and drag it to the right window

12 as shown

Exit and save, you can change the name to copy to the clipboard, etc. (the icon is changed to Copy path)

After saving, right-click any file or folder, select the menu - copy path (just named), and then get the path of the file or folder

You can open a text editor to paste and verify

How can I remove this feature if I don't want it? First open the browser and enter ~/Library/Services/ in the address bar

Jump to the service folder, right click and delete unnecessary workflow files

After deleting, the secondary menu will disappear

In fact, not only the name but also the path can be displayed in the center of the title bar at the top of the window

Type defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE in the terminal; killall Finder and press enter

The path is displayed instead of the name

The restoration method is similar, enter defaults delete com.apple.finder _FXShowPosixPathInTitle; killall Finder in the terminal and press enter

Guess you like

Origin blog.csdn.net/danielcaisz/article/details/126969444