5

I am in a Linux machine and am working with a directory that is aptly named "stealth", because it runs and hides! Take a look at this behavior:

bash-3.2$ ls /net
bash-3.2$ ls -la /net
total 4
drwxr-xr-x  2 root root    0 Jun 19 16:10 .
drwxr-xr-x 29 root root 4096 Jun 15 09:51 ..
bash-3.2$ ls /net/stealth
dir1  dir2  SERVER_LINK
bash-3.2$ ls /net
stealth
bash-3.2$ ls -la /net
total 4
drwxr-xr-x  3 root root    0 Jun 19 16:59 .
drwxr-xr-x 29 root root 4096 Jun 15 09:51 ..
dr-xr-xr-x  6 root root    0 Jun 19 16:59 stealth
bash-3.2$ uname -a
Linux cfnyps1u 2.6.18-348.18.1.el5 #1 SMP Fri Sep 6 12:37:18 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

(Note the difference between the output of ls /net before and after the contents of the stealth directory are listed)

What is the name of this type of directory, and why would it "hide" until it is "found"? I eventually figured out what was going on, but I'd never seen this behavior before and it definitely makes the directory's contents harder to find using standard approaches.

7
  • What is the output of mount before and after the directory appears?
    – depquid
    Commented Jun 19, 2014 at 21:32
  • what do you mean? Which directory to go to and what parameters to run with mount? IE what should the command read? Commented Jun 19, 2014 at 21:34
  • mount without parameters shows all filesystems currently mounted. So, before the stealth directory shows up, try: ls -la /net; mount; ls -la /net/stealth; mount
    – depquid
    Commented Jun 19, 2014 at 21:41
  • Also, what distribution are you using?
    – depquid
    Commented Jun 19, 2014 at 21:54
  • "mount" does not show "stealth" anywhere. Distribution is: Linux version 2.6.18-348.18.1.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)) #1 SMP Fri Sep 6 12:37:18 EDT 2013 Commented Jun 19, 2014 at 22:13

1 Answer 1

10

You are seeing autofs behaviour. /net tends to contain directories that are auto-mounted. Auto-mounted directories aren't mounted until you specifically use them. They will stay mounted for a set amount of time, and then if not used in that time period, they are automatically unmounted.

Try running

man autofs

to see documentation about this.

You must log in to answer this question.

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