You can view a report of hard links for a file to identify its primary link and the hard link that becomes the primary link if the primary link is deleted. The nss /ListHardLinks command returns a list of all hard links for a specified file, where the first link in the list is the primary link. The second link is the most recently created hard link. All other hard links follow in reverse chronological order of their create time. All links for the file are listed in the order that they appear in the metadata, which is also the order in which a new primary name would be assigned.
IMPORTANT:If the primary link is deleted, the most recently created hard link (the second link reported in the list) becomes the new primary link. Changing the primary link can impact the trustees and inheritance for the file. For more information, see Section 27.1.3, Hard Links and File System Trustees.
The list of hard links contains the following information for the file:
To view information about the primary link and hard links for a file on an NSS volume on Linux:
Open a terminal console, then log in as the root user.
At the terminal console prompt, enter the following to open the NSS Console:
nsscon
At the nsscon prompt, enter
/nss /ListHardLinks=vol:path\filename.ext
Replace path with the file’s primary link path or one of its hard link paths where you want to start the search. Replace filename.ext with the actual filename of the file, including the extension.
To view information about the primary link and hard links for a file on an NSS volume on NetWare:
At the server console, enter
/nss /ListHardLinks=vol:path\filename.ext
Replace path with the file’s primary link path or one of its hard link paths where you want to start the search. Replace filename.ext with the actual filename of the file, including the extension.