创建软链接:
[root@localhost test]# ln -s /test/a a.soft
[root@localhost test]# ll
total 0
-rw-r--r--. 2 root root 0 Mar 9 18:58 a
-rw-r--r--. 2 root root 0 Mar 9 18:58 a.hard
lrwxrwxrwx. 1 root root 7 Mar 9 19:10 a.soft -> /test/a
创建硬链接:
[root@localhost /]# cd /test/
[root@localhost test]# ls
[root@localhost test]# touch a
[root@localhost test]# ls
a
[root@localhost test]# ln /test/a a.hard
[root@localhost test]# ls
a a.hard
删除a文件观察内容区别,后在原路径创建新的a文件: