Drag files into Terminal to specify paths
You can save time by dragging an item from the Finder to the Terminal window, rather than typing the path. The item’s absolute path appears on the command line.
To run an executable file, drag the file to the Terminal window, then press Return.
To enter the path of a file or folder, drag the file or folder to the Terminal window.
To import settings from a Terminal settings file, choose Terminal > Preferences, click Profiles, then drag the file from the Finder to the Profiles list.
To export settings, choose Terminal > Preferences, click Profiles, then drag a profile from the Profiles list to the Finder.
To import a window group from a Terminal settings file, choose Terminal > Preferences, click Window Groups, then drag the settings file from the Finder to the Window Groups list.
To export a window group, choose Terminal > Preferences, click Window Groups, then drag the window group from the Window Groups list to the Finder.
To use a snippet of text saved as a clipping in the Finder, press the Command key, then drag the clipping to the Terminal window.
Dragging a clipping may add the escape equivalent of certain special text characters. If you don’t want to include those characters, hold down the Command key while you drag the clipping.