From ceaab3da4fa51ee142049a597274023a68032bfe Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Mon, 16 Mar 2026 09:40:18 -0500 Subject: [PATCH] Add Reveal Location Of File In Finder.app as a Mac TIL --- README.md | 3 ++- mac/reveal-location-of-file-in-finder-app.md | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 mac/reveal-location-of-file-in-finder-app.md diff --git a/README.md b/README.md index 10dcc13..c8613ce 100644 --- a/README.md +++ b/README.md @@ -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). -_1757 TILs and counting..._ +_1758 TILs and counting..._ 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) - [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) +- [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 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) diff --git a/mac/reveal-location-of-file-in-finder-app.md b/mac/reveal-location-of-file-in-finder-app.md new file mode 100644 index 0000000..031bce8 --- /dev/null +++ b/mac/reveal-location-of-file-in-finder-app.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.