RHCSA Rapid Track
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.txtfor the existing file/usr/share/doc/qemu-kvm/qmp-commands.txton 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.txtVerify 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.txtVerify 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/tempdirpointing to the directory/tmpon serverX.Create the soft link
/root/tempdir. Link it to/tmp.[root@serverX ~]#ln -s /tmp /root/tempdirVerify the newly created link with ls -l.
[root@serverX ~]#ls -l /rootlrwxrwxrwx. 1 root root 4 Mar 13 08:42 tempdir -> /tmp