Skip to content

Conversation

@yanando
Copy link

@yanando yanando commented Mar 28, 2024

Hello, I came across this tool and it almost fit my use case. The only missing part was being able to also copy all associated hardlinks, so I added this functionality.

@yanando yanando changed the title add move hardlinks functionality add move hardlinks functionality to consolidate tool Mar 28, 2024
print(f"rm {to_be_deleted}")
if execute:
# create dir on tgt if needed
os.makedirs(os.path.dirname(to_be_linked), exist_ok=True)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an issue with this line. The dirs will be created as root and won't preserve the attributes of the source

@trapexit
Copy link
Owner

trapexit commented Dec 1, 2025

One reason I didn't include this PR is honestly I just forgot to look into this. But a better reason is that inode alone is not sufficient to confirm files are the same. Not all filesystems guarantee inodes are unique in that way. In the very least, assuming the code functioned as expected, that limitation should be noted somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants