link link (1) - call the link function to create a link to a file
Examples:
link (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Michael Stone.
In order to make a physical link to a binary or file, I need to know the location of the binary/file. In this case, I am using nslookup as an example, so I type the command which to find the location of the nslookup binary.
/usr/sbin/nslookup
Now, I make a physical link to the nslookup and call the new file 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.
link-2-nslookup: LF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, stripped
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.
Server: 192.168.1.1
Address: 192.168.1.1#53
Non-authoritative answer:
Name: www.mywebuniversity.com
Address: 69.65.10.238
Server: 192.168.1.1
Address: 192.168.1.1#53
Non-authoritative answer:
Name: www.mywebuniversity.com
Address: 69.65.10.238
Server: 192.168.1.1
Address: 192.168.1.1#53
Non-authoritative answer:
Name: ourunix.com
Address: 173.51.166.200
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.