summain man page

summain — gather file checksums and metadata


summain [-cCHECKSUM] [--checksum=CHECKSUM] [--config=FILE] [--dump-config] [--dump-setting-names] [--generate-manpage=TEMPLATE] [-h] [--help] [--help-all] [--list-config-files] [--version] [--no-default-configs] [--dump-memory-profile=METHOD] [--exclude=FIELD] [--log=FILE] [--log-keep=N] [--log-level=LEVEL] [--log-max=SIZE] [--log-mode=MODE] [-m] [--mangle-paths] [--no-mangle-paths] [--memory-dump-interval=SECONDS] [--output=FILE] [-fOUTPUT-FORMAT] [--output-format=OUTPUT-FORMAT] [-r] [--relative-paths] [--no-relative-paths] [--secret=SECRET] [FILE]...


summain gathers metadata about files, and computes their checksums. It is intended to create a manifest of the files. The manifest can be used to see if something has changed: a new manifest can be created and compared with the old one with diff(1).

The manifest looks like this:

Name: foo/bar/foobar
SHA1: 1234123413241324
Mtime: 2010-01-01 02:08:00.127651 +0000
Mode: 1755

The filename is URL-encoded to ensure it is purely ASCII. Mode is in octal.

Only some inode fields are included. It does not make sense to compare, for example, the access time, so that is not included.

Time stamps are given using microsecond precision, for the benefit of those filesystems that can support precise timestamps. (Should be nanosecond, but Python return timestamps as floating point, and nanosecond precision is too much for the floating point type.)

The inode and device number fields will not be reported accurately. Instead, they are normalized so that manifests are useful after the files have been restored from backups. Accurate numbers would mean everything seems to have changed. Normalized means that there will be no differences. The numbers are reported so that hard links can be checked.

Directories named on the command line will be recursed automatically.


-c, --checksum=CHECKSUM

which checksums to compute: MD5, SHA1, SHA224, SHA256, SHA384, SHA512; use once per checksum type (default is SHA1)


do not output or compute FIELD


fill in manual page TEMPLATE

-h, --help

show this help message and exit

-m, --mangle-paths

mangle (obfuscate) paths


opposite of --mangle-paths


write output to FILE, instead of standard output

-f, --output-format=OUTPUT-FORMAT

choose output format (rfc822, csv, json)

-r, --relative-paths

print paths relative to arguments


opposite of --relative-paths


use SECRET to make mangled paths unguessable


show program's version number and exit

Configuration files and settings


add FILE to config files


write out the entire current configuration


write out all names of settings and quit


show all options


list all possible config files


clear list of configuration files to read



write log entries to FILE (default is to not write log files at all); use "syslog" to log to system log, "stderr" to log to the standard error output, or "none" to disable logging


keep last N logs (10)


log at LEVEL, one of debug, info, warning, error, critical, fatal (default: debug)


rotate logs larger than SIZE, zero for never (default: 0)


set permissions of new log files to MODE (octal; default 0600)



make memory profiling dumps using METHOD, which is one of: none, simple, or meliae (default: simple)


make memory profiling dumps at least SECONDS apart


To make a complete manifest of a directory tree so that you can later verify that nothing at all has changed:

summain foo > foo.summain

To verify that nothing has changed:

summain foo > foo.summain-2
diff -u foo.summain foo.summain-2

Referenced By