Hardlinks on NTFS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wildemar Wildenburger

    Hardlinks on NTFS

    Hi :)

    I'm thinking of letting my program create hardlinks (or symlinks). I
    know python allows doing this for ext, reiser and the like, but
    apparently not for ntfs systems.
    Is there any package out there that lets me create links in a platform
    independent way?

    bye
    wildemar
  • Méta-MCI

    #2
    Re: Hardlinks on NTFS

    Hi!

    Here, a copy of a message send on anither newsgroup (by me).




    Summary on hardlink & junction-point.

    *** Sorry, this text is in french ; but command & links are good. ***

    Synthèse sur les hardlinks et les points de jonction.


    - Les hardlinks sont des alias sur des fichiers.
    - Les points de jonction sont des alias sur des répertoires.



    A) Hardlink

    Pour créer des hardlinks, le mieux est d'utiliser fsutil.exe
    Tapez fsutil create hardlink [Entrée] pour voir la syntaxe

    Fsutil n'est pas fourni avec W2K, mais le fichier de XP fonctionne très
    bien.

    Pour connaître la liste des hardlinks, il existe hlscan.exe , fourni avec
    le Windows-resource-kit

    Quelques infos de plus, par l'aide de windows, en cherchant "hardlink"



    B) Point de jonction

    Un point de jonction permet de considérer un volume, une unité, ou un
    répertoire, comme un sous-répertoire. Il s'agit alors d'un alias, avec
    répercussion instantanée des modifications.

    Dans un DIR, les points de jonction apparaissent avec <JONCTIONà la place
    de <REP>

    Pour créer un point de jonction, il existe linkd.exe , fourni avec le
    Windows-resource-kit
    Linkd.exe permet aussi le suppression des points de jonction (mais RD
    fonctionne aussi bien)

    Pour une aide sur linkd : linkd /? (fallait y penser, hein!)

    Un article MS sur les points de jonction :


    Quelques renseignements dans l'aide de windows, à "point jonction"
    (glossaire). Chercher aussi "lecteur monté"





    Faites de beaux rêves.

    Michel Claveau


    Comment

    • Wildemar Wildenburger

      #3
      Re: Hardlinks on NTFS

      Méta-MCI wrote:
      Here, a copy of a message send on anither newsgroup (by me).
      >
      Summary on hardlink & junction-point.
      [snip]
      http://support.microsoft.com/Default.aspx?kbid=205524
      Yeah, I know :). Thanks a lot, anyway. There's also fsutils, which I
      thought about using.
      Creating the links really isn't a problem, I just don't want to worry
      about which platform I'm on.

      bye
      wildemar

      Comment

      • Dieter Deyke

        #4
        Re: Hardlinks on NTFS

        Wildemar Wildenburger <wildemar@freak mail.dewrites:
        Hi :)
        >
        I'm thinking of letting my program create hardlinks (or symlinks). I
        know python allows doing this for ext, reiser and the like, but
        apparently not for ntfs systems.
        Is there any package out there that lets me create links in a platform
        independent way?
        >
        bye
        wildemar
        This is my solution:

        import os

        def CreateHardLink( src, dst):
        import ctypes
        if not ctypes.windll.k ernel32.CreateH ardLinkA(dst, src, 0): raise OSError

        os.link = CreateHardLink

        --
        Dieter Deyke
        mailto:deyke@co mcast.net mailto:deyke@gm x.net mailto:deyke@ya hoo.com
        Vs lbh pna ernq guvf, lbh unir jnl gbb zhpu gvzr.

        Comment

        • Wildemar Wildenburger

          #5
          Re: Hardlinks on NTFS

          Dieter Deyke wrote:
          This is my solution:
          >
          import os
          >
          def CreateHardLink( src, dst):
          import ctypes
          if not ctypes.windll.k ernel32.CreateH ardLinkA(dst, src, 0): raise OSError
          >
          os.link = CreateHardLink
          Cool, thanks. :)

          wildemar

          Comment

          Working...