由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - link 一问
相关主题
HOw to find files hardlinked to a same inode?Help! E297: Write error in swap file
problem: "no inode free"where is gcc?
how to delete a file with NULL name in unix? (转载)[转载] 请教Sun Ultra 1 上的外置SCSI硬盘
Am I in trouble?solaris mem monitor
what's wrong with gcc?Re: sparc 20 would be under $50 soon with the speed of price drop of e
fileIDRe: Thank you and.Re: a question about lower IO
[转载] 问一个file system的问题?help!!!!!!!!!!!!!!!!!!!!
how to repair?turn off a Sun workstationSolaris 8 for intel can not be installed in P4?
相关话题的讨论汇总
话题: hardlink话题: symbolic话题: link话题: file话题: inode
进入Unix版参与讨论
1 (共1页)
ab
发帖数: 37
1
ln 有 hardlink and symbolic
which link is perfer.
symbolic will span file system.
但是建了一个symbolic,the file size only 29
而一个hardlink,却和原文件一样大
s****l
发帖数: 78
2
Symbolic link is a softlink, which means once you delete the original
file the link is unusable; for hardlink, even if you delete the original file
the link "file" is still there with the complete contents unchanged.
symoblic link is just a symbol
hardlink is a new inode pointing to the real data in harddisk.
both won't used more space than a "tag", but symbolic link
can refer to a folder, hardlink can only point to a file link thing.

【在 ab 的大作中提到】
: ln 有 hardlink and symbolic
: which link is perfer.
: symbolic will span file system.
: 但是建了一个symbolic,the file size only 29
: 而一个hardlink,却和原文件一样大

bz
发帖数: 1770
3
symbolic link is like an alias
hard link is like a copy.

【在 ab 的大作中提到】
: ln 有 hardlink and symbolic
: which link is perfer.
: symbolic will span file system.
: 但是建了一个symbolic,the file size only 29
: 而一个hardlink,却和原文件一样大

c*****t
发帖数: 1879
4
Conventional users should use the symbolic link as it is easier
to maintain. Hardlinked files are for system files.

【在 ab 的大作中提到】
: ln 有 hardlink and symbolic
: which link is perfer.
: symbolic will span file system.
: 但是建了一个symbolic,the file size only 29
: 而一个hardlink,却和原文件一样大

m*****e
发帖数: 4193
5
Use Symlink whenever you can.
In practice hard link is rarely used.
once you create a hard link, it's indistinguishable from the original.
it's 和原文件一样大, because they are exactly the same *one*, not because
it's a copy.

【在 ab 的大作中提到】
: ln 有 hardlink and symbolic
: which link is perfer.
: symbolic will span file system.
: 但是建了一个symbolic,the file size only 29
: 而一个hardlink,却和原文件一样大

s*****g
发帖数: 219
6
symlink和 windows 的 shortcut 一样.
hardlink 是独有的. 大概原理是这样: Unix里面
用inode来表示一个文件存储空间. 当你创建一个
文件的时候, 系统分配给你一个 inode number.
然后你生成一个 hardlink, 也会指向同一个 inode.
删除文件的时候, 系统会检查有多少个 hardlink
指向这个 inode. 如果只有一个, 把文件彻底删掉.
如果多于一个, 就只删掉一个 hardlink.
明白了这个道理, 看 perl 程序的时候, 发现删除
文件的函数叫做 unlink(), 也就不奇怪啦.

【在 ab 的大作中提到】
: ln 有 hardlink and symbolic
: which link is perfer.
: symbolic will span file system.
: 但是建了一个symbolic,the file size only 29
: 而一个hardlink,却和原文件一样大

h******a
发帖数: 198
7
Unix system calls for deleting is also "unlink"

【在 s*****g 的大作中提到】
: symlink和 windows 的 shortcut 一样.
: hardlink 是独有的. 大概原理是这样: Unix里面
: 用inode来表示一个文件存储空间. 当你创建一个
: 文件的时候, 系统分配给你一个 inode number.
: 然后你生成一个 hardlink, 也会指向同一个 inode.
: 删除文件的时候, 系统会检查有多少个 hardlink
: 指向这个 inode. 如果只有一个, 把文件彻底删掉.
: 如果多于一个, 就只删掉一个 hardlink.
: 明白了这个道理, 看 perl 程序的时候, 发现删除
: 文件的函数叫做 unlink(), 也就不奇怪啦.

1 (共1页)
进入Unix版参与讨论
相关主题
Solaris 8 for intel can not be installed in P4?what's wrong with gcc?
[转载] How can I mount local HD from Server?fileID
X Window programming[转载] 问一个file system的问题?
Re: Makefile help!( -g option)how to repair?turn off a Sun workstation
HOw to find files hardlinked to a same inode?Help! E297: Write error in swap file
problem: "no inode free"where is gcc?
how to delete a file with NULL name in unix? (转载)[转载] 请教Sun Ultra 1 上的外置SCSI硬盘
Am I in trouble?solaris mem monitor
相关话题的讨论汇总
话题: hardlink话题: symbolic话题: link话题: file话题: inode