All my UNIX executibles got kicked out of /bin

Discussion in 'Mac Programming' started by Partron22, Oct 2, 2015.

  1. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #1
    All my UNIX executibles got kicked out of /bin.
    So where do I have to put them to make them work again?
    Tryed /usr/local /bin. No Joy, although it appears to be in my PATH list.
    What's the secret?
    I'll get it eventually on my own, but don't really feel like sharpening up on UNIX just now.
    I just want my darn barometer to work again without going through a 3rd party terminal App.
     
  2. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #2
    /usr/local is where you would need to put files you add manually.
     
  3. chown33, Oct 2, 2015
    Last edited: Oct 2, 2015

    chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #3
    /usr/local/bin should work.

    Post your exact PATH value, i.e. the output of this command:
    Code:
    echo "$PATH"
    Also post the output of this command:
    Code:
    ls -la /usr/local

    You can create a user-specific bin and put commands there:
    Code:
    mkdir ~/bin
    If you want it hidden, use the 'chflags' command.

    There's nothing special about /usr/local/bin. It's just a convention. You can put a bin directory of executables anywhere you have access to. For example, /Users/Shared/bin should work fine, and be just as sharable as /usr/local/bin.
     
  4. Partron22 thread starter macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #4
    Thanks.
    Result shows up in terminal when I put the executable in /usr/local/bin
    Must have a glitch further down the line so it's not being sent off to the App as it should be.
    Most of the rest of my executibles are simpler, so maybe I'll end off getting off easy when moving them to el Capitan.
     
  5. ocabj macrumors 6502a

    ocabj

    Joined:
    Jul 2, 2009
    #5
    I prefer to use /var for my install dir, specifically /var/inst. I'll typically configure a makefile to prefix the application install directory into /var/inst/appname-version.

    e.g. /var/inst/nmap-6.49

    After that, I create/update another symlink to point a short dirname to that latest version, e.g. /var/inst/nmap symlinks to /var/inst/nmap-6.49

    Then from there, I will create (or already have created) symlinks in /usr/local/bin, /usr/local/sbin, etc to /var/inst/nmap/bin/..., /var/inst/nmap/sbin/...
     
  6. SlCKB0Y macrumors 68040

    SlCKB0Y

    Joined:
    Feb 25, 2012
    Location:
    Sydney, Australia
    #6
    Well that's all well and good but putting your executables into /var is an absolute abomination and is a sin against Unix.
     
  7. ocabj macrumors 6502a

    ocabj

    Joined:
    Jul 2, 2009
    #7
    Feel free to use your own dir structure, e.g. /opt or /inst. As far as using your own subdir in /var to store applications being an 'abomination', times change. After all, the people who initially created Unix standards thought cleartext communications for authentication was perfectly fine.
     
  8. SlCKB0Y macrumors 68040

    SlCKB0Y

    Joined:
    Feb 25, 2012
    Location:
    Sydney, Australia
    #8
    /opt is also evil and shouldn't be used. I can't think of a good reason not to use /usr/local for all this stuff.
     
  9. ocabj macrumors 6502a

    ocabj

    Joined:
    Jul 2, 2009
    #9
    To maintain previous version builds without nuking the previous build tree.
     

Share This Page