link link (1) - call the link function to create a link to a file
# link --version
link (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
# which nslookup
/usr/sbin/nslookup Now, I make a physical link to the nslookup and call the new file link-2-nslookup.
# link /usr/sbin/nslookup link-2-nslookup
I check the type of the file I just created, since it is a physical link to the file the type of file is the same as the nslookup and as shown below both files have the same i-node numbers 55980.
# file link-2-nslookup
link-2-nslookup: LF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, stripped
# ls -li /usr/sbin/nslookup link-2-nslookup
55980 -r-xr-xr-x 2 root bin 81884 2010-11-05 08:02 /usr/sbin/nslookup 55980 -r-xr-xr-x 2 root bin 81884 2010-11-05 08:02 link-2-nslookup As shown below, I am using a few examples of both nslookup and the new link-2-nslookup file I created using the link commmand. As you can see the output of both commands are the same.
# /usr/sbin/nslookup www.mywebuniversity.com
Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: www.mywebuniversity.com Address: 69.65.10.238
# ./link-2-nslookup www.mywebuniversity.com
Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: www.mywebuniversity.com Address: 69.65.10.238
# nslookup ourunix.com
Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: ourunix.com Address: 173.51.166.200
# ./link-2-nslookup ourunix.com
Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: ourunix.com Address: 173.51.166.200
Please click on " link in PDF " format.
Please click on " link in HTML " format.