shafs is a tool to help you
SHA256 an entire filesystem, file by file, storing its hash and file size in a SQLite database.
On Ubuntu do:
sudo apt install sqlite3 sudo apt install libsqlite3-dev
Please check your distribution for the appropriate packages.
git clone https://github.com/ojrdevcom/shafs.git cd shafs ./build.sh
To install locally, uncomment last line in
build.sh and re-run it or run :
sudo make install
git clone https://github.com/ojrdevcom/shafs.git cd shafs mkdir -p m4 autoreconf --install ./configure make sudo make install
shafs [-v] <src_dr> <sqlite_file>
shafs -v /usr/lib ~/usrlib_hashed.db
$ shafs ~/ebooks/ ~/ebooks.db $ sqlite3 ~/ebooks.db sqlite> select filepath, count(*) as duplicates from shafs group by filehash having duplicates > 0 order by duplicates desc;
sqlite> select * from shafs order by filesize desc;
shafs is released under the terms of the MIT license
See the LICENSE file at our Github source repository for details