mirror of
https://github.com/jbranchaud/til
synced 2026-07-02 23:58:25 +00:00
Add Reveal Location Of File In Finder.app as a Mac TIL
This commit is contained in:
@@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/).
|
|||||||
|
|
||||||
For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter).
|
For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter).
|
||||||
|
|
||||||
_1757 TILs and counting..._
|
_1758 TILs and counting..._
|
||||||
|
|
||||||
See some of the other learning resources I work on:
|
See some of the other learning resources I work on:
|
||||||
|
|
||||||
@@ -746,6 +746,7 @@ If you've learned something here, support my efforts writing daily TILs by
|
|||||||
- [Require Additional JS Libraries In Postman](mac/require-additional-js-libraries-in-postman.md)
|
- [Require Additional JS Libraries In Postman](mac/require-additional-js-libraries-in-postman.md)
|
||||||
- [Resize App Windows With AppleScript](mac/resize-app-windows-with-applescript.md)
|
- [Resize App Windows With AppleScript](mac/resize-app-windows-with-applescript.md)
|
||||||
- [Resizing Both Corners Of A Window](mac/resizing-both-corners-of-a-window.md)
|
- [Resizing Both Corners Of A Window](mac/resizing-both-corners-of-a-window.md)
|
||||||
|
- [Reveal Location Of File In Finder.app](mac/reveal-location-of-file-in-finder-app.md)
|
||||||
- [Run A Hardware Check](mac/run-a-hardware-check.md)
|
- [Run A Hardware Check](mac/run-a-hardware-check.md)
|
||||||
- [Run AppleScript Commands Inline In The Terminal](mac/run-applescript-commands-inline-in-the-terminal.md)
|
- [Run AppleScript Commands Inline In The Terminal](mac/run-applescript-commands-inline-in-the-terminal.md)
|
||||||
- [Set A Window To Its Default Zoom Level](mac/set-a-window-to-its-default-zoom-level.md)
|
- [Set A Window To Its Default Zoom Level](mac/set-a-window-to-its-default-zoom-level.md)
|
||||||
|
|||||||
@@ -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.
|
||||||
Reference in New Issue
Block a user