Linux common commands-61: ln

The ln command means link, and the function is to create a link for a certain file. There are two kinds of links here, one is a hard link, and the other is a symbolic link, also called a soft link.

A hard link is a copy of the source file, the same size as the source file, but does not actually take up any space. Soft links can be understood as shortcuts in windows , which can create soft links for folders.

Common parameters:


 # 为文件test.py创建硬链接文件 ln # 为test.py创建软链接 ln -s # 通过ls -l来查看文件的链接情况ls -l # 删除链接文件unlink

This article is reprinted from
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment

Your email address will not be published.