zlacker

[return to "Understanding the bin, sbin, usr/bin, usr/sbin split (2010)"]
1. EdScho+Oa[view] [source] 2022-05-11 07:57:55
>>taubek+(OP)
I once sent out a proposal on the FreeBSD lists to merge /sbin with /bin, and /usr/sbin with /usr/bin. People were concerned that this would slow down the system, due to PATH lookups taking longer. Even when I demonstrated the opposite was true (it being faster due to fewer directories needing to be scanned), I wasn't able to get consensus. What a shame.
◧◩
2. mekste+fv[view] [source] 2022-05-11 11:24:44
>>EdScho+Oa
What ancient system makes a speed difference in command lookup in PATH?
◧◩◪
3. EdScho+tz[view] [source] 2022-05-11 11:57:27
>>mekste+fv
Calls like execvp() do little more than splitting PATH on ':', followed by repeatedly invoking execve() on ${dir}/${filename}. The fewer elements you have in PATH, the fewer execve() calls need to be performed in the worst case.
◧◩◪◨
4. cridde+C71[view] [source] 2022-05-11 14:46:28
>>EdScho+tz
Is that ever going to be a hot path?
◧◩◪◨⬒
5. hnlmor+nG1[view] [source] 2022-05-11 17:10:22
>>cridde+C71
Theoretically can be. Every command you invoke without a path will need to look up PATH.

In practice well behaving shells cache the contents of PATH to speed up operations.

[go to top]