Hardlink sub-directories and files

Tim Chase python.list at tim.thechases.com
Tue Aug 2 13:17:10 CEST 2011

On 08/02/2011 04:32 AM, loial wrote:
> I am trying to hardlink all files in a directory structure using
> os.link.
> Or is there an easier way to hardlink everything in a directory
> structure?.
> The requirement is for hard links, not symbolic links

While Peter & Thomas gave good answers, also be aware that 
hard-links can't cross mount-points (an OS limitation).  So if 
you have something mounted under the directory you're trying to 
hard-link-copy, attempting to create a hard-link will fail for 
things within that mount.


More information about the Python-list mailing list