I had a directory called $RECYCLE.BIN which I did not create. I deleted it accidentally and as result all other directories beside it was removed too.

This is what happened in the terminal:

b@thebeast ~/Downloads]$ ls
Objective-C Essential Training
[ben@thebeast ~/Downloads]$ rm -r $RECYCLE.BIN
[ben@thebeast ~/Downloads]$ ls
[ben@thebeast ~/Downloads]$

Does anybody have had the same experience or know what is special about this $RECYCLE.BIN?

4 Answers 4


The shell running in Terminal uses $ to identify variables. So if you want to remove or edit (or reference in general) a file whose name contains a $ you need to protect/escape it

vi SYS\$OUT.txt

As the variable $RECYCLE most probably didn't exist, the variable got replaced by "nothing" in your case resulting in

rm -r .BIN

being run. This still doesn't fully explain what happened though because all you should have gotten is a rm: .BIN: No such file or directory error.

  • I checked history now and I realised that I put a * symbol after $RECYCLE. As you said "echo $RECYCLE*" returned all directories in the current folder which result in deleting everything. Thanks for the great explanation.
    – bman
    Dec 30, 2013 at 22:34

Were you running Parallels Desktop with a Windows Virtual Machine?

These folders are created if you are using the Shared Folders feature in Parallels Desktop. You can disable it in Virtual Machine -> Configure -> Shared Folders.

These folders can be safely deleted if you don't care about their contents.

  • what's the influence of disabling the shared folders? Parallels Windows cannot access the folders any more?
    – ddzzbbwwmm
    Sep 7, 2021 at 14:36
  • 1
    The shared folders are mostly about convenience for transferring files between the host & VM (they can directly access the same folders). If disabled, you have to transfer files by dragging & dropping or copy/pasting. It is more secure to leave them disabled, as it better isolates the VM from the host machine.
    – David P.
    Sep 9, 2021 at 1:54

$RECYCLE.BIN is a hidden folder on Windows systems. It's the Recycle Bin, as you may have guessed. Did you by chance use this disk in a Windows machine at some time? That would explain how it arrived on the disk. Since it's in your Downloads folder, it's more likely that it was accidentally included with a .zip file that you extracted.

  • I do not have a Windows installed at my MacBookPro. I never had. But I downloaded many files and it is possible that it came from internet. But how come that deleting that directory cause other directories to be also deleted? Is something wrong with my hard disk?
    – bman
    Dec 30, 2013 at 1:18

Since it is in your Downloads folder I would bet it was in a poorly compressed file. It could have been compressed with the Note.txt file.

I get the Thumbs.db files all the time, it is created by Windows when it makes the thumbnails and is not removed during compression like hidden files should be.

You must log in to answer this question.

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