An article to learn soft and hard links|Shortcut|Operating system|centos7

前言

那么这里博主先安利一些干货满满的专栏了!

首先是博主的高质量博客的汇总,这个专栏里面的博客,都是博主最最用心写的一部分,干货满满,希望对大家有帮助。

高质量博客汇总https://blog.csdn.net/yu_cblog/category_12379430.html?spm=1001.2014.3001.5482

 


Creation of soft and hard links to files

Soft link creation command:

ln -s source-file target-file

Hard link creation command:

ln source-file target-file

The filename can be a relative path or an absolute path.

example:

5f77230ca54f4f9797c838189fa254e9.png

1bfcb0debc534121b94e68ae55a538e7.png

c3d7e8ae86f24fe29a1b601d029ba20b.png

The difference between soft and hard links

The essential difference between soft and hard links:

  1. Soft links have independent inodes
  2. A soft link is a separate file
  3. Hard links do not have their own inodes
  4. A hard link is not a separate file

813a76698520435db7123290c8c048d1.png

What is the use of soft and hard links?

soft link

Equivalent to shortcuts under windows!

dbb50f9ebc954fc8a15b63dd36967b75.png

hard link

The essence is to alias a file!

3b036e4997df4b998d6dfa17ad63e528.png

cb40ee992ef14a23862ac02c07417fc5.png

 

Supongo que te gusta

Origin blog.csdn.net/Yu_Cblog/article/details/132369048
Recomendado
Clasificación