Where is command stored ??
suppose if i would like to know where is "exit" command stored then how can we know it. ??
not only "exit" command but any command say where is "ls" command stored , it is stored in which file. Is there is any command for it ??? |
are you searching fore these?
whereis apropos try them out, like whereis ls apropos whereis they tell you where and what something is...and oh, with apropos you don't have to use complete names, just a part of a name is sufficient - apropos tries to search things that include the string you gave to it :) |
other options are "which" and "type -p".
These applications work by searching directories listed in the environmental variable named $PATH As long as the application is in one of these directories (you will know if you can start the program with just the name without a directory path), you should have no trouble finding it. The type command is particularly useful in that you can use certain flags to determine what kind of file it is, such as whether a command is an actual program or if it is merely an alias or function. |
thanks b0uncer and mikshaw.
|
If your system is running slocate (and it probably is) try the command
locate ls or whatever it is you want to find. slocate runs daily and creates a database of all the files on your system. |
You can also try
type X where X is the command you're intested in. And once you find it you can do file X and it will show what type of file it is, an ELF executable, a shell script, etc. |
Thanks realjustin and dah'dee
|
All times are GMT -5. The time now is 09:33 AM. |