-
symbolic link
软连接,本质是Unix概念,不是Python概念。
-
link in Unix
A link in UNIX is a pointer to a file.
Like pointers in any programming languages, links in UNIX are pointers pointing to a file or a directory.
Creating links is a kind of shortcuts to access a file.
There are two types of links:
- Soft link or Symbolic links
- Hard Links
These links behave differently when the source of the link is moved or removed.
Symbolic links are not updated(they merely contain a string which is the pathname of its target); hard links always refer to the source, even if moved or removed.
-
Python 相关函数
os.readlink(path) : returns a string representing the path to which the symbolic link points.
理解什么是symbolic link in Python
最新推荐文章于 2025-03-28 12:20:18 发布