A tool for detecting duplicate files and comparing directories.
Project description
pathdiff
Pathdiff is a tool for:
- Detecting duplicate files in directories (Based on https://stackoverflow.com/a/36113168/300783)
- Comparing directories for differences in structure and content
There are a number of alternative tools for both usecases, but this is a simple implementation that can be easily modified (unlike complex gui tools) and provides small conveniences like progress bars (unlike more basic command line tools like diff).
Table of Contents
Installation
pip install pathdiff
Usage
❯ pathdiff find-duplicates tests/test1
Fetching files from tests/test1
|████████████████████████████████████████| 9 in 0.1s (85.56/s)
Fetching file sizes
|████████████████████████████████████████| 9/9 [100%] in 0.1s (87.68/s)
Computing small hashes
|████████████████████████████████████████| 9/9 [100%] in 0.1s (85.21/s)
Computing full hashes
|████████████████████████████████████████| 9/9 [100%] in 0.1s (83.98/s)
Duplicates found:
tests/test1/path1/file2.txt
tests/test1/path1/file3.txt
tests/test1/path1/file1.txt
Duplicates found:
tests/test1/path1/file4.txt
tests/test1/path2/file7.txt
Duplicates found:
tests/test1/path1/file5.txt
tests/test1/path1/file6.txt
Duplicates found:
tests/test1/path2/file8.txt
tests/test1/path2/file9.txt
❯ pathdiff compare-directories tests/test2/path1 tests/test2/path2
Comparing directories tests/test2/path1 and tests/test2/path2
Comparing directory structures
|████████████████████████████████████████| 12 in 0.1s (114.04/s)
Comparing common files
|████████████████████████████████████████| 4/4 [100%] in 0.1s (37.66/s)
Files found in tests/test2/path1 but not found in tests/test2/path2:
file2.txt
file1.txt
Files found in tests/test2/path2 but not found in tests/test2/path1:
file8.txt
file7.txt
Files found in tests/test2/path1 and tests/test2/path2 but contents do not match:
file5.txt
file6.txt
License
pathdiff
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pathdiff-1.0.0.tar.gz
(8.0 kB
view hashes)