mklinks: tool for finding and hardlinking identical files
Latest release 20210306: Use cs.cmdutils.BaseCommand for main programme, add better progress reporting.
Mklinks walks supplied paths looking for files with the same content, based on a cryptographic checksum of their content. It hardlinks all such files found, keeping the newest version.
Unlike some rather naive tools out there, mklinks only compares files with other files of the same size, and is hardlink aware - a partially hardlinked tree is processed efficiently and correctly.
Class FileInfo
Information about a particular inode.
Method FileInfo.assimilate(self, other, no_action=False)
Link our primary path to all the paths from other. Return success.
Method FileInfo.same_dev(self, other)
Test whether two FileInfos are on the same filesystem.
Method FileInfo.same_file(self, other)
Test whether two FileInfos refer to the same file.
Method FileInfo.stat_key(S)
Compute the key (dev,ino) from the stat object S.
Class Linker
The class which links files with identical content.
Method Linker.addpath(self, path)
Add a new path to the data structures.
Method Linker.merge(self, *a, **kw)
Merge files with equivalent content.
Method Linker.scan(self, *a, **kw)
Scan the file tree.
Function main(argv=None)
Main command line programme.
Class MKLinksCmd(cs.cmdutils.BaseCommand)
Main programme command line class.
Method MKLinksCmd.apply_defaults(self)
Set up the default values in options.
Method MKLinksCmd.apply_opts(self, opts)
Apply command line options.
Method MKLinksCmd.main(self, argv)
Usage: mklinks [-n] paths... Hard link files with identical contents. -n No action. Report proposed actions.
Release Log
Release 20210306: Use cs.cmdutils.BaseCommand for main programme, add better progress reporting.
Release 20171228: Initial PyPI release of cs.app.mklinks.
Metadata
Release files for cs-app-mklinks 20210306
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cs.app.mklinks-20210306.tar.gz | 5.9 kB | Without provenance | Details for cs.app.mklinks-20210306.tar.gz |
Release files / cs.app.mklinks-20210306.tar.gz
| Download URL | cs.app.mklinks-20210306.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c88d0a61990d79305250f781cf2571f4b751e9b9e29000e136e796a374246f4
|
|
BLAKE2b-256 checksum How to use checksums |
f5dc073ceb8108aa785330fc3152489b86145dc372776f74d95b9f1b05665192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.2
|
Security for cs-app-mklinks 20210306
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.