How to find all hard links to a given file?
-samefile name
File refers to the same inode as name. When -L is in effect, this can include symbolic links.
-samefile name
File refers to the same inode as name. When -L is in effect, this can include symbolic links.
Which permissions affect hard-link creation? Does file ownership itself matters?
Two setuid programs, /usr/bin/bar and /usr/bin/baz, share a single configuration file foo. The configuration file’s mode is 0640, for it holds sensitive information. The one program runs as bar:bar (that is, as user bar, group bar); the other as baz:baz. Changing users is not an option, and even changing groups would not be preferable.
In the manual page of tar command, an option for following hard links is listed.