由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - Symbolic Link: ln 和 cp -s 是一样的么?
相关主题
SSA, 能不能讲一下 inodehowto install vboxguestadditions on CentOS.
我也快被firefox和java弄疯了,请大侠支招问个用dropbox的问题
symbolic link的问题请问这里有人试过在Ubuntu下安装lyx么?
关于符号链接,如何限制用户删除?openoffice 显示方框
问一个关于symbolic link的问题一个非常烦人的problem
大家能帮我看一下下面的问题吗,不胜感激。请教如何更改启动时的默认目录?
问个关于find 的问题Linux GNU C, readlink问题 (转载)
请教bash命令弱弱的问问几个跟Linux有关的问题
相关话题的讨论汇总
话题: link话题: symbolic话题: remove话题: ln话题: inode
进入Linux版参与讨论
1 (共1页)
B*********s
发帖数: 292
1
两者什么区别?
如果我ln了一个目录到当前目录,那么我删除的时候,删除的是这个link呢,还是那个
目录下的真文件?
惭愧惭愧,这都是linux基本知识,却没有掌握好。
S*A
发帖数: 7142
2
There are two kinds of link:
symbol link & hard link.
symbol link is just point to a differnt file/directory name.
hard link directly point the same inode struct, also increase
the inode reference count.
symbol link, if you remove the link, it just remove the pointer.
It does not harm to your real file. Also if people remove the
real file, you symlink is invalid.
hard link, if you remove either of the file, only remove the
directory entry, and decrease the reference count on inode.
when the inode reference count drop to zero, the file get
deleted. That is why inside the kernel, the remove system
call is actually call unlink.

【在 B*********s 的大作中提到】
: 两者什么区别?
: 如果我ln了一个目录到当前目录,那么我删除的时候,删除的是这个link呢,还是那个
: 目录下的真文件?
: 惭愧惭愧,这都是linux基本知识,却没有掌握好。

1 (共1页)
进入Linux版参与讨论
相关主题
弱弱的问问几个跟Linux有关的问题问一个关于symbolic link的问题
[help] insmod error message: no symbol version for module_layout大家能帮我看一下下面的问题吗,不胜感激。
emacs关于symbolic link怎么修改设定? (转载)问个关于find 的问题
Federal 14请教bash命令
SSA, 能不能讲一下 inodehowto install vboxguestadditions on CentOS.
我也快被firefox和java弄疯了,请大侠支招问个用dropbox的问题
symbolic link的问题请问这里有人试过在Ubuntu下安装lyx么?
关于符号链接,如何限制用户删除?openoffice 显示方框
相关话题的讨论汇总
话题: link话题: symbolic话题: remove话题: ln话题: inode