crypto.bi
Ad
Get paid for social media engagement!
Join Arena App NOW

shafs – SHA256 a filesystem and store it on SQLite. Find duplicate files, organize your data

shafs is a tool to help you SHA256 an entire filesystem, file by file, storing its hash and file size in a SQLite database.

Dependencies

shafs requires sqlite3

On Ubuntu do:

sudo apt install sqlite3
sudo apt install libsqlite3-dev

Please check your distribution for the appropriate packages.

Build

git clone https://github.com/rektbuildr/shafs.git
cd shafs
./build.sh

Installation

To install locally, uncomment last line in build.sh and re-run it or run :

sudo make install

Manual Build + Install

git clone https://github.com/rektbuildr/shafs.git
cd shafs
mkdir -p m4
autoreconf --install
./configure
make
sudo make install    

Usage

shafs [-v] <src_dr> <sqlite_file>

Example

shafs -v /usr/lib ~/usrlib_hashed.db

Finding Duplicate eBooks

$ 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;

Finding Largest Files

sqlite> select * from shafs order by filesize desc;

License

shafs is released under the terms of the MIT license

See the LICENSE file at our Github source repository for details

Links

shafs Source Code

About the Author
Published by Crypto Bill - Bill is a writer, geek, crypto-curious polyheurist, a dog's best friend and coffee addict. Information security expert, encryption software with interests in P2P networking, decentralized applications (dApps), smart contracts and crypto based payment solutions. Learn More About Us