In this lab, you will create hard and soft links.
Outcomes
The user creates a hard link and a soft link.
Create an additional hard link /root/qmp-manual.txt for the existing file /usr/share/doc/qemu-kvm/qmp-commands.txt on serverX.
Create the hard link /root/qmp-manual.txt. Link it to the file /usr/share/doc/qemu-kvm/qmp-commands.txt.
[root@serverX ~]#ln /usr/share/doc/qemu-kvm/qmp-commands.txt /root/qmp-manual.txt
Verify the link count on the newly created link /root/qmp-manual.txt.
[root@serverX ~]#ls -l /root/qmp-manual.txt-rw-r--r--.2root root 63889 Nov 11 02:58 /root/qmp-manual.txt
Verify the link count on the original file /usr/share/doc/qemu-kvm/qmp-commands.txt.
[root@serverX ~]#ls -l /usr/share/doc/qemu-kvm/qmp-commands.txt-rw-r--r--.2root root 63889 Nov 11 02:58 /usr/share/doc/qemu-kvm/qmp-commands.txt
Create the soft link /root/tempdir pointing to the directory /tmp on serverX.
Create the soft link /root/tempdir. Link it to /tmp.
[root@serverX ~]#ln -s /tmp /root/tempdir
Verify the newly created link with ls -l.
[root@serverX ~]#ls -l /rootlrwxrwxrwx. 1 root root 4 Mar 13 08:42 tempdir -> /tmp