一种检测文件中的位腐烂的工具。
rotten_bites的Python项目详细描述
用于检查bit rot的小实用程序。这个项目是 受chkbit和 bitrot。两个项目都有 喜欢他们和其他我不喜欢的东西。我拿走了我喜欢的东西 我自己做的。
烂咬的重点是可伸缩性和速度。为了达到这个目的, 小文件(.bit_check)放在每个目录中。我知道,不 一个人想要一个“bunch of turdy files sprinkled all over your hard drive”,但在我看来这是最好的 允许灵活性的方法(文件夹可以没有任何移动) 因为所有路径都与该目录相关)和 可伸缩性(一个中央数据库存储了所有文件 规模良好)。
有两个组件可以让人讨厌:cli和library。我 设计的烂咬是基于回调的,所以很容易 延伸。请参见cli(rotten_bites/__main__.py)和rot_check.py, 例如。
安装
pip install rotten_bites
用法
Usage: rotten_bites [OPTIONS] DIRECTORY Given a directory, rotten bites calculates the sha1 hash of every file and stores it in .bit_check files. Once stored, subsequent checks will see if the hash has changed, detecting bit rot. Status codes: 'E' error, sha1 mismatch 'a' add to index 'u' update sha1 ' ' not modified (shown only with verbose) '?' could not read file (permission denied or file no longer exists) Options: --delete Delete all .bit_check files. -n, --dry-run Run without making any changes. No .bit_check files are created or updated --ignore-list FILENAME List of files and folders to ignore. Similar syntax to .gitignore files. "-" can be used to read from stdin. -q, --quiet Turn off all output except for hash errors. -v, --verbose Display all files that are scanned, even if they haven't changed --verify Verify hashes without updating. --help Show this message and exit.