1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Other What Makes Your Life, Meh?

Discussion in 'General' started by Mr_Mistoffelees, 10 Aug 2023.

  1. Gareth Halfacree

    Gareth Halfacree WIIGII! Lover of bit-tech Administrator Super Moderator Moderator

    Joined:
    4 Dec 2007
    Posts:
    17,951
    Likes Received:
    7,939
    I know this isn't the point of your post, and you may already know it, but just in case: which file. That'll tell you what specific file will be run for a given command - in this case, file. If it's installed and in your path, you'll know where to look; if it's not, you'll get an error (well, no, you'll get nothing, but you do get a non-zero exit condition, which is good enough.)

    Code:
    blacklaw@helios64:~$ which file
    /usr/bin/file
    blacklaw@helios64:~$ which notfile
    blacklaw@helios64:~$
    
    If you see the second, then the command you're trying to run simply ain't there - either it's not installed or it's not on your path.
     
    IanW and Byron C like this.
  2. Byron C

    Byron C I was told there would be cheesecake…?

    Joined:
    12 Apr 2002
    Posts:
    11,085
    Likes Received:
    5,765
    Honestly, that may well have been something I tried… I use it often, because I’ve been burned too many times by wacky conflicts between pyenv and uv…

    What really threw me off was getting a “permission denied” error when running “man” - of all the commands that could scold me for not having the right permissions, I get a telling off from “man”…?!

    Like I said, it just turned out that neither the “file” nor “man” packages had been installed. I expect missing packages in containers, because I try to use “slim” or “minimal” variants to keep image sizes down (although I don’t touch “alpine” with a bargepole if I can help it… [shudder]). But I don’t expect to get permission errors when a package simply isn’t installed…!

    Docker still has some way to go on macOS arm64!
     

Share This Page