• HardLink

    • 要求link和Target必须在同一个盘符下
    • 只能连接文件,不能连接文件夹
    • 区别于Copy,HardLink后的相互关联的文件可以更改同步
    • 创建: CreateHardLink : The security descriptor belongs to the file to which a hard link points. The link itself is only a directory entry, and does not have a security descriptor. Therefore, when you change the security descriptor of a hard link, you a change the security descriptor of the underlying file, and all hard links that point to the file allow the newly specified access. You cannot give a file different security descriptors on a per-hard-link basis.
    • 被Hard Link的文件的文件属性必须是share的。Flags, attributes, access, and sharing that are specified in CreateFile operate on a per-file basis. That is, if you open a file that does not allow sharing, another application cannot share the file by creating a new hard link to the file.
    • 文件属性的更改生效时刻是文件被改后首次打开时。When you create a hard link on the NTFS file system, the file attribute information in the directory entry is refreshed only when the file is opened, or when GetFileInformationByHandle is called with the handle of a specific file.
    • 如果CreateHardLink的参数Path是一个Symbolic link,那么CreateHardLink直接与Symbolic link的Target建立Hard link. Symbolic link behavior—If the path points to a symbolic link, the function creates a hard link to the target.
    • 删除hard link的顺序任意,不受创建顺序影响。 You can delete them in any order regardless of the order in which they are created.

For example, in a system where C: and D: are local drives and Z: is a network drive mapped to \fred\share, the following references are permitted as a hard link:
C:\dira\ethel.txt linked to C:\dirb\dirc\lucy.txt
D:\dir1\tinker.txt to D:\dir2\dirx\bell.txt
C:\diry\bob.bak linked to C:\dir2\mina.txt
The following are not:
C:\dira linked to C:\dirb
C:\dira\ethel.txt linked to D:\dirb\lucy.txt
C:\dira\ethel.txt linked to Z:\dirb\lucy.txt

  • Junctions

    • also called softlink
    • the storage objects it references are separate directories,
      a junction can link directories located on different local volumes on the same computer
    • Junctions are implemented through reparse points.
    • it should be noted that if the target is deleted, moved or renamed, all junctions which point to the target will break and continue to point to a non-existing directory.

Assuming the same conditions in the Hard Links section, the following references are permitted as junctions:
C:\dira linked to C:\dirb\dirc
C:\dirx linked to D:\diry
The following are not:
C:\dira\one.txt linked to C:\dirb\two.txt
C:\dir1 linked to Z:\dir2

  • Symbolic Link

    • Symbolic links are transparent to users; the links appear as normal files or directories, and can be acted upon by the user or application in exactly the same manner.
    • Symbolic links can point to any file or folder either on the local computer or using a SMB path to point at targets over a network
    • CreateSymbolicLink
    • Target删掉后,link应该都不好使了,与Junctions类似

工具:

  1. Microsoft mklink: https://docs.microsoft.com/zh-cn/windows-server/administration/windows-commands/mklink?view=vs-2015
  2. https://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

参考:

  1. https://www.2brightsparks.com/resources/articles/NTFS-Hard-Links-Junctions-and-Symbolic-Links.pdf

HardLink SymbolLink Junctions相关推荐

  1. Linux下的softlink和hardlink(转)

    Linux中包括两种链接:硬链接(hard link)和软链接(soft link),软链接又称为符号链接(symbolic link) 创建命令: ln -s destfile/directory  ...

  2. Linux下的softlink和hardlink

    Linux中包括两种链接:硬链接(hard link)和软链接(soft link),软链接又称为符号链接(symbolic link) 创建命令: ln -s destfile/directory ...

  3. Linux下的softlink和symbolic link(hardlink)

    Linux中包括两种链接:硬链接(hard link)和软链接(soft link),软链接又称为符号链接(symbolic link) 创建命令: ln -s destfile/directory  ...

  4. tewa750g 虚拟服务器,把你的打印机共享出来:Hardlink 固网 打印服务器HP-1007

    把你的打印机共享出来:Hardlink 固网 打印服务器HP-1007 2014-11-19 20:15:02 22点赞 69收藏 47评论 最近办公室几个人抢打印机比较恼火,开始搜索解决方法,然后就 ...

  5. NTFS之HARDLINK攻防

    NTFS之HARDLINK攻防 引用: http://www.debugman.com/thread/2061/1/1 http://www.debugman.com/thread/2062/1/1 ...

  6. Linux输入输出I/O

    Linux输入输出I/O 本文主要以一张图介绍Linux在I/O上做了哪些事情,即Linux中直接I/O原理. 引言 先看一张图: 这张图大体上描述了Linux系统上,应用程序对磁盘上的文件进行读写时 ...

  7. linux中的ln属性,linux 常用基础命令 ln 详细介绍

    命令介绍: ln是linux中又一个非常重要命令,ln是为某一个文件在另外一个位置建立一个同步的链接.当我们需要在不同的目录,用到相同的文件时,我们不需要在每一个需要的目录下都放一个必须相同的文件,我 ...

  8. mac修改默认python版本_Anaconda/MacOS:更改默认python版本

    好吧,我在连续体邮件列表中发现了类似的问题. 通过conda重新安装python解决了这个问题$ conda install python=2.7 Fetching package metadata: ...

  9. PHP的学习--PHP的引用

    引用是什么 在 PHP 中引用意味着用不同的名字访问同一个变量内容.这并不像 C 的指针,替代的是,引用是符号表别名.注意在 PHP 中,变量名和变量内容是不一样的,因此同样的内容可以有不同的名字.最 ...

  10. Ubuntu终端远程工具

    1. ssh 1.1. 安装 sudo apt install openssh-server # 服务端sudo apt install openssh-client # 客户端 1.2. 使用 # ...

最新文章

  1. 找Java培训机构有哪些评判标准
  2. LeetCode 59 Spiral Matrix II(螺旋矩阵II)(Array)
  3. 阿里云常见问题及解决方案:
  4. 计算机视觉算法——目标检测网络总结
  5. yum安装mysql和mysql源,配置mysql(亲测)
  6. bootstrap 图片预览_教你简单用Photoshop制作GIF图片
  7. MFC BCGControlBar 库 使用方法
  8. 错过血亏!深入学习Redis集群搭建方案及实现原理
  9. 光源时间_【精品透视】UVLED紫外固化光源崭露头角!
  10. 周记 2019.3.25~2019.3.31
  11. ionic2+angular2中踩的那些坑
  12. 六款值得推荐的数据挖掘得力助手
  13. java 爬虫处理数据_Java语言实现爬虫实战
  14. 数字证书原理[转载]
  15. 从国产浏览器更换到谷歌浏览器的心路历程
  16. 每日一句_《鹧鸪天·西都作》
  17. MATLAB之function函数
  18. elasticsearch 拼音分词(elasticsearch-analysis-pinyin)
  19. 使用ffmpeg 合并音频视频
  20. OnSysCommand( UINT nID, LPARAM lParam );分析

热门文章

  1. 21个小故事、透过现象看本质
  2. 如何在Mac上裁剪图片,教你几个技巧
  3. windows操作快捷键
  4. CSS像素(px)、物理像素(pt)、rem、em、rpx
  5. scrapy爬虫部署服务器
  6. 解决刷了Gargoyle固件后某些LED灯不亮的问题
  7. 7628刷breed_H大的最新版Breed不死u-boot
  8. 网易邮箱接收ibm的邮件_在IBM Integration Bus中发送和接收带有大型附件的SOAP消息
  9. YAPI自动生成接口文档,解放测试人生产力...
  10. 免费SSL证书和付费SSL证书有什么区别?