[Mac OS X] Command line to quickly enter current directory from Finder

Method 1:


Take the cd some_diretory command as an example, first enter the command line, type "cd", and then drag and drop the desired folder from the Finder to the command line. The absolute path to the folder is automatically populated at the end of the command line.

Method 2:


Set a shortcut in Finder. Specific steps are as follows.

1) Finder -> Services -> Services Preferences

2) Select "New Terminal at Folder" and "New Terminal Tab at Folder" in Services (Shortcuts) in the pop-up dialog box, and close the dialog box

3) Then in the Finder Any folder, right-click, in the pop-up dialog box, select "New Terminal at Folder" or "New Terminal Tab at Folder" in Services.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326795854&siteId=291194637