help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help-bash Digest, Vol 144, Issue 20


From: Kerin Millar
Subject: Re: Help-bash Digest, Vol 144, Issue 20
Date: Sat, 2 Dec 2023 22:57:14 +0000

On Sun, 3 Dec 2023 05:22:41 +0700
Budi <budikusasi@gmail.com> wrote:

> >
> > On Bash' hash
> 
> 
> what actually is it all about ?

It is a builtin command used for inspecting and manipulating the shell's 
internal hash table of command names to their fully qualified paths.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/hash.html
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01
 (section 1.e)

The purpose of the table is to avoid repeatedly walking PATH in the course of 
locating previously executed external commands. Presumably, to do so would have 
been very expensive back in the late 1970s.

> As needing definitive answer for
> https://news.ycombinator.com/item?id=38458996

It is unrelated to the requirement laid out by the above thread, which is 
essentially requesting a solution to a non-problem in any operating system that 
implements demand paging, Linux included.

https://en.wikipedia.org/wiki/Demand_paging

-- 
Kerin Millar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]