๐ File references and what happens when you enter a command
๐ก Newskategorie: Linux Tipps
๐ Quelle: reddit.com
I have been doing a bit of research into what exactly happened when I type a command like python3 example.py
. So far I have learned that when I do this my computer runs to the $PATH environment variable to know where to search for commands. This I understand, what I don't get is how that file is referenced. for example when I run ls -l
in a directory from $PATH I get something that looks like this:
lrwxr-xr-x 1 admin 36 4 May 23:14 autopoint -> ../Cellar/gettext/0.21/bin/autopoint lrwxr-xr-x 1 admin 28 11 Feb 2021 brew -> /usr/local/Homebrew/bin/brew lrwxr-xr-x 1 admin 35 4 May 23:14 envsubst -> ../Cellar/gettext/0.21/bin/envsubst lrwxr-xr-x 1 admin 40 8 Aug 11:21 expo -> ../lib/node_modules/expo-cli/bin/expo.js lrwxr-xr-x 1 admin 40 8 Aug 11:21 expo-cli -> ../lib/node_modules/expo-cli/bin/expo.js lrwxr-xr-x 1 admin 45 18 Jul 22:00 freetype-config -> ../Cellar/freetype/2.10.4/bin/freetype-config lrwxr-xr-x 1 admin 30 18 Jul 21:58 fsc -> ../Cellar/scala/2.13.6/bin/fsc lrwxr-xr-x 1 admin 33 18 Aug 16:05 gdbm_dump -> ../Cellar/gdbm/1.20/bin/gdbm_dump lrwxr-xr-x 1 admin 33 18 Aug 16:05 gdbm_load -> ../Cellar/gdbm/1.20/bin/gdbm_load lrwxr-xr-x 1 admin 32 18 Aug 16:05 gdbmtool -> ../Cellar/gdbm/1.20/bin/gdbmtool lrwxr-xr-x 1 admin 34 4 May 23:14 gettext -> ../Cellar/gettext/0.21/bin/gettext lrwxr-xr-x 1 admin 37 4 May 23:14 gettext.sh -> ../Cellar/gettext/0.21/bin/gettext.sh lrwxr-xr-x 1 admin 37 4 May 23:14 gettextize -> ../Cellar/gettext/0.21/bin/gettextize
What is the reference at the end (after the arrow)? what would that be called? I know that it calls the file listed but I don't understand the mechanism that links this bin file to the executable.
Any help or resources would be greatly appreciated.
[link] [comments] ...