copy 501 directory from .Trashes of external drive, but not visible I have a usb drive plugged in my Macbook. And I found I have mis-deleted several files, so I 

cd /Volumes/MyUsbDrive/.Trashes 

and I find a directory named 501, so I

cp -r 501 ~

from terminal, I can see the 501 directory was copied, but it is not visible from Finder. It has a long format of 

drwxr-xr-x@

and even I changed the name of it, it does not display in Finder. All its contents are accessible from terminal through.

I use OS X 10.11.6. 

Is it a bug in the OS X?
Short answer

No, this is not a bug in OS X.

Long answer

Mac OS X volumes contain quite a few files and folders that are invisible from the Finder. Usually they're hidden for a good reason and most users won't ever need to see them. Basically, because people shouldn't muck around with them unless they know what they're doing, Apple has designed the system to hide them.

501 folder

On volumes other than the boot volume, a .Trashes folder is used to store files &amp; folders that've been moved to the trash but not yet emptied. Because every user has their own personal trash can, subfolders are created under .Trashes for each user, named according to their user ID number. For example, if user #501 throws something on a volume named "Harry" into the trash, it'd be moved to a folder named /Volumes/Harry/.Trashes/501/.