Drag & Drop Finder Items into the Terminal to Automatically Type their Full Path

Mar 2, 2011 - 5 Comments

drag-file-into-terminal-for-path

You can instantly print an items full path in the Terminal by dragging and dropping any Finder item into a Terminal window.

In the screenshot above, I have dragged Quartz Composer into a Terminal tab while nano was open. The full path is then typed out automatically, as shown in the screenshot below:

file-path-dragged-file-terminal

The next time you’re in the Finder and want to access a file or directory within the terminal, try this out, I find it’s quicker than using tab completion for deeply buried files.

Related articles:

Posted by: William Pearson in Command Line, Mac OS X, Tips & Tricks

5 Comments

» Comments RSS Feed

  1. michael says:

    nice trick

  2. DD says:

    wow, what a kewl trick! leave it to Apple…

  3. [...] If you want to use a text file that is buried deep somewhere on your Mac, remember you can drag and drop the icon into the Terminal to display it’s full path. [...]

  4. [...] approach would be to type “cd ” followed by dragging a folder into the terminal to print the full path, then hitting return to get the same result. [...]

  5. [...] is to type the first part of the command then drag and drop the file into the Terminal window. This automatically types the path for [...]

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Shared on Facebook

Shop at Amazon

Ad

OSXDaily on Facebook