1
0
mirror of https://github.com/jbranchaud/til synced 2026-07-03 16:18:24 +00:00

Add Reveal Location Of File In Finder.app as a Mac TIL

This commit is contained in:
jbranchaud
2026-03-16 09:40:18 -05:00
parent c7711ca337
commit ceaab3da4f
2 changed files with 22 additions and 1 deletions
@@ -0,0 +1,20 @@
# Reveal Location Of File In Finder.app
In the terminal I have the path to an image file. I want to open Finder.app to
the location of that image file so that I can drag and drop it into a file
upload area in the browser.
Instead of opening a Finder.app window and navigating directory by directory to
the location, I can use the `open` command. Using `open` directly with the image
file will open the image in Preview.app. I want to reveal the directory that the
image file is in within Finder.app. _Reveal_ is the keyword and the `-R` flag
does just that.
Here is an example of this that I actually ran when uploading a screenshot that
went into [this blogmark post](https://still.visualmode.dev/blogmarks/255):
```bash
$ open -R /Users/lastword/images/tiobe-index-graph-march-2026.png
```
See `man open` for more details.