Hot answers tagged

3 votes

Changing permissions of a symbolic link (exercise from school)

Sounds like a trick question. On several systems, you can change the permissions of symlinks with the fchmodat(2) system call with the AT_SYMLINK_NOFOLLOW flag or with a lchmod(2) system call and with ...
Stéphane Chazelas's user avatar
1 vote
Accepted

What's limiting the depth of a recursive symlink chain?

When you do cd haha/haha/..., or really use any path symlinks, the kernel has to resolve the links to figure out where the path points to. In Linux, there's a limit to how many links it resolves ...
ilkkachu's user avatar
  • 138k
1 vote
Accepted

mirror a directory tree by hard links for file contents and symlinks for directory structure

It's not so difficult to implement. On a GNU system (for ln -r and sha1sum -z) and with zsh: mkdir -p mirror/{data,tree} && find original -type f -exec sha1sum -z {} + | while IFS= read -...
Stéphane Chazelas's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible