Have several hardlinks to the same file.
How (for example) by one file(hardlink) get others pointing to the same data?
No real task. Just interesting. May be useful.
Most filesystems do not maintain a directory of where the hardlinks to a file (or more precisely, to an indode) are.
So you'll have to scan the whole filesystem to find all hardlinks. You can do this using
Create file with link:
As you can see, both file entries have the same inode (37) - because they are hardlinks to the same data.
Find by inode number:
This is on Linux, but it should work the same on *BSD.