what is the /net directory?

Discussion in 'macOS' started by spooner1887, Oct 11, 2010.

  1. spooner1887 macrumors newbie

    Oct 11, 2010

    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.
  2. maflynn Moderator


    Staff Member

    May 3, 2009
    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
  3. old-wiz macrumors G3

    Mar 26, 2008
    West Suburban Boston Ma
    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.
  4. LPZ macrumors 65816

    Jul 11, 2006
    Are you sure it's empty? What do you get if you enter

    cd /net; ls -al
    in Terminal.

    As others have suggested, please leave it alone.
  5. Ganesha macrumors regular

    Aug 4, 2009
    Anyway a short story to what /net is.

    If you use the df command, you'll get lines like:
    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.
  6. spooner1887 thread starter macrumors newbie

    Oct 11, 2010

    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.
  7. GGJstudios macrumors Westmere


    May 16, 2008
    Mac Virus/Malware Info
  8. soliddrain macrumors newbie

    Oct 13, 2010
    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

Share This Page

7 October 11, 2010