Home  >  Q&A  >  body text

linux为什么不能对目录建立硬链接?

linux文件系统中,为什么不能对目录建立硬链接?

怪我咯怪我咯2743 days ago846

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:05:17

    http://askubuntu.com/questions/210741/why-are-hard-links-not-allowed-for-directories

    ; Generally, it is currently impossible to use hard links for directories. Once used, messages such as operation
    ; not permitted will appear.
    ;
    ; Directories are not allowed to use hard links. The reason is generally that hard links are required in directories
    ; If used, it means that all files and subdirectories in the directory must be processed. Hard link action,
    ; The result level has been separated from the hard link situation of simple general file projects.
    ;
    ; Next, once hard link is allowed in the directory, if you create a file
    ; and directory in the directory, this means that the files in these two directories must be processed as hard link situation, then the entire
    ; environment will become very complicated.

    http://bbs.chinaunix.net/thread-2212171-1-1.html

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 15:05:17

    http://unix.stackexchange.com/questions/22394/why-are-hard-links-to-directories-not-allowed-in-unix-linux

    reply
    0
  • 迷茫

    迷茫2017-04-17 15:05:17

    You have to post the error message, it may be a permissions issue

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 15:05:17

    Because after you ln . xxx, then rm -rf xxx will enter the D state.

    reply
    0
  • Cancelreply