I'm writing a simple regression test for a tool like which(1) and someone pointed out there's no guarantee that there is always /bin/sh (AIX seems to have sh(1) as /usr/bin/sh, for example) and we shouldn't try to use it in the test.

But we can still say there is always /bin/cat (not /usr/bin/cat or /opt/gnu/bin/cat or whatever,) right? If you are aware of any *nix variant withOUT /bin/cat, please let me know.

  • 1
    No, in HP-UX, cat is in /usr/bin/cat Besides, WHY ? Why do you want to call binaries from their full path ? Which Unices are you intending to support ? Besides, BSD-based Unices (BSD's, Solaris, macOS) have different userland tools, you must be very careful, here.
    – thecarpy
    Commented Jun 25, 2017 at 14:03
  • NixOS remarkably breaks all sorts of path assumptions.
    – thrig
    Commented Jun 25, 2017 at 14:50
  • @thrig Cool, I'll give it a try, just to get some fresh air...
    – nodakai
    Commented Jun 25, 2017 at 15:43


You must log in to answer this question.

Browse other questions tagged .