I just accidentally mounted a new drive to a folder that already contained files. I don't care about them and have them somewhere else, but that folder appears empty now. I'm curious what happened to the files. Are they simply deleted by Linux?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
Just shadowed. Will be there again when unmounted. :) Though, if you're curious, you can reach them right now using It's also worth noting Aufs, just in case. ;) |
||||
|
|
|
The newly mounted filesystem is like an overlay which hides part of the initial filesystem. There are trick to access the files, like the bind mount as described by poige. On Linux I personally like the fact that you can mount a filesystem more than once on different mount points. So you can perfectly well mount the root filesystem on Gotcha's:
|
|||
|
not mountedin so that if I browse into it, I'll know immediately that it wasn't mounted for whatever reason. – killermist Jun 23 '12 at 4:46