This was also new to me. However, doing some investigation I concluded to the following:
$ whereis GET
GET: /usr/bin/GET /usr/share/man/man1/GET.1p.gz
So, this is a "command" under /usr/bin
.
$ file /usr/bin/GET ; ll /usr/bin/GET
/usr/bin/GET: symbolic link to lwp-request
lrwxrwxrwx 1 root root 11 Jan 11 21:01 /usr/bin/GET -> lwp-request*
It is a symbolic link for lwp-request
under the same directory.
$ ll /usr/bin/ | grep lwp-request
lrwxrwxrwx 1 root root 11 Jan 11 21:01 GET -> lwp-request*
lrwxrwxrwx 1 root root 11 Jan 11 21:01 HEAD -> lwp-request*
lrwxrwxrwx 1 root root 11 Jan 11 21:01 POST -> lwp-request*
-rwxr-xr-x 1 root root 16200 Jan 11 21:01 lwp-request*
There are other "symbolic links" to the same executable.
$ file /usr/bin/lwp-request ; dpkg -S /usr/bin/lwp-request
/usr/bin/lwp-request: Perl script text executable
libwww-perl: /usr/bin/lwp-request
This is a Perl script coming with the libwww-perl package.
$ man GET
More information about the command will reveal that there is a -u
option:
-u Print request method and absolute URL as requests are made.
So, if we try the command in the Question using the -u
option:
$ GET -u / HTTP/1.1
it displays:
GET file:/
<HTML>
<HEAD>
<TITLE>Directory /</TITLE>
<BASE HREF="file:/">
</HEAD>
<BODY>
<H1>Directory listing of /</H1>
...
</BODY>
</HTML>
GET http://www.HTTP.com/1.1
<html><head><title>www.http.com</title></head><frameset BORDER='0' frameborder='0' framespacing='0' rows='100%,*'>
<frame name='target' src='http://www.i5.com/calacom'>
<noframes> <body BGCOLOR='#FFFFFF'>
This page requires that your browser supports frames.
<BR>You can access the page without frames with this <a href='http://www.i5.com/calacom'>link</A>.
</body></noframes></frameset></html>
We see that when the GET
command is given two arguments, it tries to access two URLs:
- file:/
- http://www.HTTP.com/1.1
The first one is a listing of the local /
directory. The second one is the (probably non-existent) "page" 1.1
of the web site http.com
which contains a "frame" to display the page http://www.i5.com/calacom
.