Symlinks can:
- Point to directories
- Point to non-existent objects
- Point to files and directories outside the same filesystem
Hard links can:
- Keep the file that they reference from being deleted
Hard links are especially useful in performing "copy on write" applications. They allow you to keep a backup copy of a directory structure, while only using space for the files that change between two versions.
The command cp -al
is especially useful in this regard. It makes a complete copy of a directory structure, where all the files are represented by hard links to the original files. You can then proceed to update files in the structure, and only the files that you update will take up additional space. This is especially useful when maintaining multigenerational backups.
Read full article from command line - Why hard links are not allowed for directories? - Ask Ubuntu
No comments:
Post a Comment