this post was submitted on 17 Mar 2024
1140 points (97.6% liked)

Programmer Humor

19289 readers
1197 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 128 points 6 months ago (55 children)

Does anyone actually use touch for its intended purpose? Must be up there with cat.

[–] [email protected] 11 points 6 months ago (1 children)

cat

Ahhhhh, fuck. I'm quite noob with linux. I got into some rabbit hole trying to read the docs. I found 2 man pages, one is cat(1) and the other cat(1p). Apparently the 1p is for POSIX.

If someone could help me understand... As far as I could understand I would normally be concerned with (1), but what would I need to be doing to be affected by (1p)?

[–] Phoenix3875 2 points 6 months ago

If you execute a binary without specifying the path to it, it will be searched from the $PATH environment variable, which is a list of places to look for the binary. From left to right, the first found one is returned.

You can use which cat to see what it resolves to and whereis cat to get all possible results.

If you intentionally wants to use a different binary with the same name, you can either directly use its path, or prepend its path to $PATH.

load more comments (53 replies)