You can save time in Terminal by dragging rather than typing. You can drag an item from the Finder to the Terminal window and its complete path will appear on the command line.
To run an executable file, drag the file’s icon to the Terminal window and press Return.
To enter the path of a file or directory without having to type the whole path, drag the file or directory into the Terminal window.
The complete path is entered on the command line.
To import settings from a settings file, choose Terminal > Preferences, click Settings, and then drag the settings file from the Finder to the Settings list.
To import a window group in a settings file, choose Terminal > Preferences, click Window Groups, and then drag the settings file from the Finder to the Window Group list.
To export settings, choose Terminal > Preferences, click Settings, and then drag the setting from the Settings list, to the Finder.
To export a window group, choose Terminal > Preferences, click Window Groups, and then drag the window group from the Window Group list, to the Finder.
To drag a clipping into Terminal, press the command key and drag the clipping to the Terminal window.
Dragging a clipping in Terminal escapes special characters. To avoid Terminal escaping any characters, press the command key when you drag the clipping.
Here is a simple example of how to use this with a command. Let’s say you want to change your present working directory to a folder named “Feedback” on your desktop. Type cd (change directory command) with a space after it, and then drag the Feedback folder from your desktop into Terminal, and press Return.
Terminal changes your present working directory to the Feedback directory.
You’ll see this:
[hostname:~] yourname% cd /Users/yourname/Desktop/Feedback