MattLucas1505

Q: Where is my /dev folder

Guys, trying to install and use Wireshark on my 1st gen unibody MBP (10.6.6 2.4GHz 4GB) and there are some background processes which involve changing permissions on some files in the /dev folder. There's a script included which should change these permission on startup, which is all fine, but it fails when it runs telling me there's an error on line 35 - now I'm no programmer and I haven't pulled apart the script to find what line 35 is trying to do, but what is clearly part of the problem is that I have no /dev folder. I have unhidden the hidden files and folders, and I have a /dev alias, but no /dev folder. Clicking the alias tells me it can't find the destination. Now all documentation I can find tells me that the /dev folder should be in the root of the drive on all versions of Mac OS incl Snow Leopard. Have they changed it with 10.6.6 or one of the other point releases? Seems to be a pretty fundamental thing to have removed, but I sure as **** haven't removed it, and surely (given that it contains device drivers) if it was meant to be there and wasn't, I'd be running into some pretty severe difficulties running the machine at all. So where on earth is it, and more to the point, does anyone know enough about Wireshark for Mac OS to help me out (I know, I can ask on their forums, and I will - this is more about the apparent lack of this apparently fairly critical directory).

XServe 2 x 2.8GHz Quad Xeon, 2GB RAM, 3TB RAID 0, Mac OS X (10.5.7), MBP Unibody 1st Gen, 2.4 Core 2 Duo, 4 GB RAM.

Posted on Feb 6, 2011 1:57 PM

Close

Q: Where is my /dev folder

  • All replies
  • Helpful answers

  • by Niel,Helpful

    Niel Niel Feb 6, 2011 2:20 PM in response to MattLucas1505
    Level 10 (312,914 points)
    Mac OS X
    Feb 6, 2011 2:20 PM in response to MattLucas1505
    Now all documentation I can find tells me that the /dev folder should be in the root of the drive on all versions of Mac OS incl Snow Leopard.


    It is, but it is hardcoded to be invisible to the GUI and can't be made visible in the normal fashion. Only Terminal commands and similar functions can locate or interact with it.

    (56675)
  • by BobHarris,Helpful

    BobHarris BobHarris Feb 6, 2011 3:06 PM in response to MattLucas1505
    Level 6 (19,474 points)
    Mac OS X
    Feb 6, 2011 3:06 PM in response to MattLucas1505
    If /dev was not there, your system would not boot successful.

    Applications -> Utilities -> Terminal

    ls -la /dev

    You should either look at line 35 and see what it is complaining about, or contact the Wireshark developers, or take this questions to the Mac OS X Technologies > Unix Forum
    <http://discussions.apple.com/forum.jspa?forumID=735>
    Where, if you post a copy of the script wrapped in
     tags, they may be able to help.


    ...
    ... a copy of the script here ...
    ...
    {code}
  • by Linc Davis,Solvedanswer

    Linc Davis Linc Davis Feb 7, 2011 7:03 AM in response to MattLucas1505
    Level 10 (207,978 points)
    Applications
    Feb 7, 2011 7:03 AM in response to MattLucas1505
    The Wireshark developers tell you to change the permissions of certain device files. That's a bad idea, and unnecessary. What you should do instead is add an ACL to the executable that needs access to those files. For example, if the user named "foo" needs to run Wireshark:
    sudo -s
    chown 0:0 $( which dumpcap )
    chmod 4700 $_
    chmod +a "foo allow execute" $_
    Repeat the last command for each user who needs access.
  • by MattLucas1505,

    MattLucas1505 MattLucas1505 Feb 7, 2011 3:19 PM in response to Linc Davis
    Level 1 (22 points)
    Feb 7, 2011 3:19 PM in response to Linc Davis
    Thanks guys, that's helped a lot - furthering my OS X understanding, lol. I'm not going to pull apart the script - that's far too much like Chinese to me, lol and I don't think I'd know enough scripting to understand what the **** it was talking about anyway. However, it does point me in the right direction, and I at least know where to take it next (to Wireshark, lol).

    Anyway, thanks again for the help.
  • by marudi,

    marudi marudi May 12, 2011 1:55 PM in response to MattLucas1505
    Level 1 (0 points)
    May 12, 2011 1:55 PM in response to MattLucas1505

    Hi,

    Fairly new to MAC but have quite of experience already. I need serious help with where the ACTUAL "dev" folder is as no one seems to mention it. I see it under terminal but alias after showing hidden does not see it.

    I need to remove the cu.Banja-COM1 device as I am trying to setup a USB-Serial (prolific and have the OS X drivers) for my Cisco configurations with Zterm. This is from the ls -la /dev command;

     

    crw-rw-rw-   1 root   wheel      11,   5 May 12 15:24 cu.Banja-COM1

    crw-rw-rw-   1 root   wheel      11,   9 May 12 15:24 cu.Bluetooth-Modem

    crw-rw-rw-   1 root   wheel      11,   7 May 12 15:24 cu.Bluetooth-PDA-Sync

    crw-rw-rw-   1 root   wheel      11,   3 May 12 15:24 cu.Ghost-BlackBerryBypassS

    crw-rw-rw-   1 root   wheel      11,   1 May 12 15:24 cu.teeesBlackBerry9530-Bla

     

    OS X - Snow Leopard is what I am using.

  • by Linc Davis,

    Linc Davis Linc Davis May 12, 2011 2:36 PM in response to marudi
    Level 10 (207,978 points)
    Applications
    May 12, 2011 2:36 PM in response to marudi

    The dev folder isn't really part of the filesystem, and it's not accessible in the Finder, even if you show hidden files. Don't try to delete any of the items in there. Instead, inactivate or uninstall the kernel extension that creates the device file. The one you mentioned is created by third-party software, and I don't know what that might be -- some kind of serial port driver.

  • by rccharles,

    rccharles rccharles May 13, 2011 12:21 PM in response to marudi
    Level 6 (8,486 points)
    Classic Mac OS
    May 13, 2011 12:21 PM in response to marudi
    I need serious help with where the ACTUAL "dev" folder is as no one seems to mention it. I see it under terminal but alias after showing hidden does not see it.

    dev is an abbrivation of device.  It is a very low level listing of devices attached to your system. Like: harddrives, serial ports, etc.  Everything in Unix was forced to appear as a filesystem. This was done for consistancy.

     

    You can see the directory by

    Macintosh-HD -> Applications -> Utilities -> Terminal

    ls /

     

    Robert

  • by OregonRebel,

    OregonRebel OregonRebel Sep 22, 2016 8:29 AM in response to BobHarris
    Level 1 (37 points)
    Mac OS X
    Sep 22, 2016 8:29 AM in response to BobHarris

    BobHarris wrote:

     

    If /dev was not there, your system would not boot successful.

     

    That is incorrect.

    The partition I'm booted to now is missing that folder, which is why I was researching the issue and found this discussion.

    Yes, I have hidden folders displayed - I'm familiar with many root level files & folders (although I'd like to know what that 0-byte .file is that keeps reappearing).

     

    dev missing.png

     

    When I enter /dev into Finder's Go To Folder box I get this:

    dev folder.png

     

     

    My other boot partition on this volume has it, although it's completely empty.

    And I have external drives which contain clones of my internal boot partitions, and they have the folder too - all empty.

    It seems odd that clones of my boot partition contain the folder while the boot partition itself does not.

    I'm not aware of this missing folder causing any problems, just wondering why it's missing from my primary partition and why it's empty (I've read that it should contain device-specific files), especially considering that some folks (with a lot of points) think it's required to boot.

  • by BobHarris,

    BobHarris BobHarris Sep 22, 2016 4:48 PM in response to OregonRebel
    Level 6 (19,474 points)
    Mac OS X
    Sep 22, 2016 4:48 PM in response to OregonRebel

    OregonRebel wrote:

     

    BobHarris wrote:

     

    If /dev was not there, your system would not boot successful.

     

    That is incorrect.

    The partition I'm booted to now is missing that folder, which is why I was researching the issue and found this discussion.

    Yes, I have hidden folders displayed - I'm familiar with many root level files & folders (although I'd like to know what that 0-byte .file is that keeps reappearing).

     

    dev missing.png

     

    When I enter /dev into Finder's Go To Folder box I get this:

    dev folder.png

     

     

    My other boot partition on this volume has it, although it's completely empty.

    And I have external drives which contain clones of my internal boot partitions, and they have the folder too - all empty.

    It seems odd that clones of my boot partition contain the folder while the boot partition itself does not.

    I'm not aware of this missing folder causing any problems, just wondering why it's missing from my primary partition and why it's empty (I've read that it should contain device-specific files), especially considering that some folks (with a lot of points) think it's required to boot.

    It still exists.

     

    Applications -> Utilities -> Terminal

    Enter the command:

    ls /dev