[Cialug] Very well-hidden directory

Thomas Kula kula at tproa.net
Tue May 26 10:14:07 CDT 2015


On Tue, May 26, 2015 at 10:04:01AM -0500, Daniel A. Ramaley wrote:
> There exists a hidden directory on a machine, one so hidden that not 
> even "ls -a" can show it. How is this possible? This is on Oracle Linux.

This is a common thing for some advanced filesystems. For example, I see
ZFS snapshots by going into ".zfs/snapshots" on a box I happen to have
here, and on an Isilon cluster at job[-1] there was a ".snapshot"
directory that acted this way. 

> [...]

> I'm not trying to solve any particular problem other than a bit of ignorance on my part. I didn't think it was possible to hide a directory so well that common tools like "ls" and "du" can't see it. Tab completion in bash also doesn't work for discovering the directory; i have to explicitly type out all the characters in its name to interact with it.
> 

It's pretty easy, actually. Simply don't put an entry in the directory
file. With that, nothing that relies on the entries being there will see
it, but if you try to setcwd(2) or otherwise access the path, the
specific filesystem knows what to do. These tend to be (in my
experience) things generated on the fly. 


-- 
Thomas L. Kula | kula at tproa.net | http://kula.tproa.net/


More information about the Cialug mailing list