하드링크와 심볼릭링크 차이. Diff btw Hard link & Symbolic link
파일의 링크 두 종류 하드링크와 심볼릭 링크. 원본파일이 'inode1'을 사용하면 하드링크도 'inode1'을 사용하게되지만, 심볼릭 링크는 'inode2'를 만들어서 사용한다. 데이터는 원본파일과 연결된다. 윈도우의 바로가기 아이콘과 같은 개념.
There are two types of link; hard link and symbolic link. When original file uses 'inode1'. hard link uses 'inode1' as well, but symbolic link makes 'inode2' and links data to original file. Symbolic is same idea as shortcut icon in windows.
1. create /root/linktest and 'basefile' file inside the directory.
2. use 'ln' command to create hard link file and symbolic file.
=> ~]# ln basefile hardlink
~]# ln -s basefile softlink
youll see basefile and hardlink have same inode#, unlike softlink
3. Compare hard link and soft link
=> ~]# cat hardlink
4. Move original file to somewhere and compare those links again
Now you got the ideas of hardlink and symbolic link