LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What does "cp is hashed" (https://www.linuxquestions.org/questions/linux-newbie-8/what-does-cp-is-hashed-772297/)

Karas 11-29-2009 02:29 PM

What does "cp is hashed"
 
I realise cp is copy, I was just using that as an example.

I am just wondering what does it mean when certain commands come up as hashed, when I use the type <command>?

Just inquiring really.

colucix 11-29-2009 03:19 PM

Try these for some details:
Code:

$ type hash
$ man 1p hash

and a well explained article about hash is this. Here is an excerpt:
Quote:

$ type foo
foo is hashed (/usr/local/bin/foo)

This is reporting that the shell has saved the meaning of foo in a hash table as /usr/local/bin/foo (...). Caching the command in a hash table is an optimization that saves the shell from having to search $PATH every time.


All times are GMT -5. The time now is 07:35 PM.