Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#6 Search for related hardlinks

open
nobody
None
5
2014-08-29
2007-09-20
Maxim
No

It's either hard or impossible currently to find all hardlinks for a file instance. It's "nice to have" and "very useful" feature. For example: you need file hardlinked in several folders. Once you copy the file instead of hardlinking, and then make hardlink from the copied file, it's impossible to tell, what hardlinks link to what instance of the file, without checking file content. And if the file is binary, then say "hello" to fc.exe

Discussion

  • Black Winny
    Black Winny
    2007-10-03

    Logged In: YES
    user_id=1904314
    Originator: NO

    Hi !

    The tool exists. It's been created by Microsoft in 2001 year. Its name is hlscan.exe

    To download it, go to :
    http://www.microsoft.com/downloads/details.aspx?familyid=289ADEE4-ABB3-4E18-AB07-C77DB8654979&displaylang=en

    It will be installed in the C:\Program Files\Resource Kit folder. An advice : after installation, copy your hlscan.exe in your Windows folder, it's easier to use.

    Its a command line tool. To be opened simply in a prompt DOS window.

    Syntax :

    HLSCAN [/all | /dir <path> | /file <filename>] [/log [<logfile>]] /?

    Without additional parameters, Hlscan displays hard links on the current volume.

    Parameters:

    /all Displays files with hard links on all NTFS volumes of
    the system.

    /dir <path> Displays files with hard links in the specified
    directory and in its subdirectories
    (recursive search).

    /file <filename> Displays all names for the specified
    file (non-recursive search).

    /log <logfile> Writes the output to the specified file
    instead of displaying it in the command
    window. The default logfile location is Hlscan.log
    in the current directory.

    /? Displays help.

    Note that it needs Msvcp50.dll in the %systemroot%\system32 (usually c:\windows\system32) folder. Very easy to find on the web (here http://www.dll-files.com/dllindex/dll-files.shtml?msvcp50 for example) if you have not... or on your Windows installation disk.

    Kind regards,
    Jacques (from France)

     
  • Maxim
    Maxim
    2007-10-03

    Logged In: YES
    user_id=727019
    Originator: YES

    black_winny: Thanks. But since NTFSlink can maintain additional info in NTFS streams, there's no need to search the whole partition to find hardlinks for one particular file. Answer can be given instantly.

     
  • Aphrodite
    Aphrodite
    2014-08-29

    findlinks.exe in sysinternals