Command line and power tools
Simple, frequently needed, and hidden behind a modifier key nobody discovers by accident.
Select the file and press ⌥⌘C. The full POSIX path goes to the clipboard:
/Users/sam/Documents/report.pdf
Or right-click, hold Option, and "Copy" becomes Copy as Pathname.
Dragging any file into a Terminal window pastes its path, already escaped for spaces. This is the fastest method when you are already at a prompt.
⌘I, then the Where field. Selectable and copyable, though it gives the parent folder rather than the full path to the file.
pwd # current directory
echo "$PWD/filename" # a file here
realpath filename # resolves symlinks (needs coreutils)
To put it straight on the clipboard:
pwd | pbcopy
A path with spaces breaks in the shell:
/Users/sam/My Project/report.pdf # fails
/Users/sam/My\ Project/report.pdf # works
"/Users/sam/My Project/report.pdf" # also works
⌥⌘C copies the unescaped form, so pasting into a Terminal usually needs quoting. Dragging does the escaping for you, which is why it remains the practical method for shell work — and why a search tool that offers a shell-escaped copy saves a small irritation many times a day.
⌥⌘C in Finder copies the full POSIX path.
Spaces need escaping or quoting. Dragging the file into Terminal escapes automatically.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Download for Mac