5

I am unable to determine the path to the Bin directory, the one that is shown in Finder window when I click on The Trash icon in the Dock.

I am seeking it, so I can either use the Finder's Go to Folder... or Terminal's open command to directly open the Bin folder in Finder.

8
  • 2
    It's not a single path, it's a kind of Smart Folder, it's per user & also one for each non-boot drive iirc ~/.Trash finds your local folder
    – Tetsujin
    Commented Aug 5, 2021 at 10:28
  • 1
    See apple.stackexchange.com/questions/335092/…
    – Tetsujin
    Commented Aug 5, 2021 at 10:29
  • The terminal command set will give you the information for the path of bin(s) directory(ies).
    – user415185
    Commented Aug 5, 2021 at 10:36
  • 1
    There is not one bin, so “the bin” is not a thing but many.
    – bmike
    Commented Aug 5, 2021 at 11:18
  • 2
    It would probably be wise to avoid calling it a ‘bin’ folder, even in UK English, because in Unix-like operating systems such as macOS, ‘bin’ is the name of several directories where low-level programs — traditionally called ‘binaries’ — are stored: /bin, /usr/bin, /usr/local/bin, etc.
    – gidds
    Commented Aug 5, 2021 at 21:07

2 Answers 2

5

Each user gets their own bin on each volume that’s attached, so your assumption that path stores all files visible in the “bin” or “trash” isn’t technically true. The implementation of trash(es) folders is covered on older OS here.

The most common case is a “soft deleted” home folder file, so to access that bin, do this:

cd ~/.Trash/

Worse, localization comes into play (trash, bin, basura) so this is a delightfully complicated “simple” question.

5

If your goal is to "directly open the Bin [a.k.a. Trash] folder in Finder" from Terminal, you may use this command to open the special combined trashes window:

osascript -e 'tell application "Finder" to open trash'

Presumably you should change "trash" to "bin" if your system uses that.

1
  • 1
    Astounding - yet another correct way to parse this “simple” request using the command line. This does open the bin in Finder.
    – bmike
    Commented Aug 5, 2021 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .