Drag and drop into Terminal
To save time in typing commands, you can drag an item from the Finder to the Terminal window and its complete path will be entered on the command line.
- To run an executable file, drag the file's icon to the Terminal window and press Return.
- To change the color of the Terminal window or text, drag a color from the Colors window to the Terminal window. If you drop the color on an empty part of the window, the window background changes to the color. If you drop it on text, the text changes to the new color.
- To display a directory path at the insertion point, drag the directory (or a file in the directory) to the Terminal window. For example, if you want to change your working directory to a directory named "Feedback" on your desktop, type cd with a space after it, then drag the Feedback directory from your desktop into Terminal. You'll see this:
[hostname:~] yourname% cd /Users/yourname/Desktop/Feedback
Press Return and Terminal changes to the Feedback directory.