Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

spooner1887

macrumors newbie
Original poster
Oct 11, 2010
12
0
Hello,

So I was working today and I noticed this "net" directory in my root folder. It is 1kB in size and is empty. It was modified recently (i.e. I don't think it came with my mac) and when I type

sudo rm -r /net

I get the answer

rm: net/: Resource busy

I can change its name but I cannot delete it.

I was just wondering what this directory is for and why I can't delete it.
Also how can I delete it. Thanks.
 
The only advice I can give you is not to use sudo to force delete, alter or change directories found in the root drive that you do not know the purpose. OSX/Unix creates directories that it requires to run, you start messing with it, could mess up your system
 
Messing around with command line when you don't know unix well and don't know what you are doing is a great way to scramble your system to the the point where you will need to reinstall from scratch.

Many many people screw things up by running amok with command line or by changing permissions without knowing what they are doing.
 
Hello,

So I was working today and I noticed this "net" directory in my root folder. It is 1kB in size and is empty.

Are you sure it's empty? What do you get if you enter

Code:
cd /net; ls -al

in Terminal.

As others have suggested, please leave it alone.
 
Anyway a short story to what /net is.

If you use the df command, you'll get lines like:
Code:
map auto_home          0         0          0   100%    /home
map -hosts             0         0          0   100%    /net

Autofs is behind these two lines. These entries refer to files /etc/auto_home and /etc/hosts. The master configuration file for autofs /etc/auto_master. Autofs basically sets up and controls where things get automatically mounted. You can look up more information on autofs using The Google. OS X uses a similar system to Sun's Solaris.
 
Ganesha,

Thanks, for the info. With that information I think I can now figure it out. Googling "/net mac" and variations thereof were incredibly useless.

To others,
I was puzzled about why I had this empty directory on my Snow Leopard laptop while it did not exist on my Leopard machine. I was wondering if it
was a spyware that had created this directory (maybe similar to the LSO's
created by Adobe), especially since it had been modified recently (not by me). Also this machine is fairly new (i.e. 2weeks) and my fear
of irreparable harm was minuscule. I am aware of the dangers of playing in
the root directory, I just hate having junk directories installed when
I don't need them. Thanks for the warnings anyhow.
 
The only advice I can give strength to not use sudo to remove, alter or change the directory can only be found on the drive that you do not know the end. OSX Unix create a directory it needs to run, to start dealing with it might upset the system
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.