summaryrefslogtreecommitdiff
path: root/summain.1
blob: ec2438c34c98a8b6a53878987c1e7379587851bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.TH SUMMAIN 1
.SH NAME
summain \- gather file checksums and metadata
.SH SYNOPSIS
.B summain
.RB [ \-m ]
.RB [ \-\-mangle\-paths ]
.RB [ \-r ]
.RB [ \-\-relative\-paths ]
.RI [ file ...]
.SH DESCRIPTION
.B summain
gathers metadata about files,
and computes their checksums.
It is inteded to create a 
.I manifest
of the files.
The manifest can be used to see if something has changed:
a new manfest can be created and compared with the old one with
.BR diff (1).
.PP
The manifest looks like this:
.IP
.nf
Name: foo/bar/foobar
Sha-1: 1234123413241324
Mtime: 2010-01-01 02:08:00 +0200
Mode: 1755
.fi
.PP
The filename is URL-encoded to ensure it is purely ASCII.
Mode is in octal.
.PP
Only some inode fields are included.
It does not make sense to compare, for example, the access time,
so that is not included.
.PP
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.
.PP
Directories named on the command line will be recursed automatically.
.SH OPTIONS
.TP
.BR \-r ", " \-\-relative\-paths
Print pathnames relative to the command line argument they derive from.
If the command line argument is the directory called
.I foo
and there is a file called
.IR bar ,
normally 
.I foo/bar
is printed as the name.
With this option,
.I bar
is printed instead.
This can be handy for normalizing the paths for comparing two copies of the
same directory tree in two different locations on disk:
run 
.B summain
on both,
and compare the output with
.BR diff (1).
.TP
.BR \-m ", " \-\-mangle\-paths
Mangle or obfuscate all paths in the output.
This is good if you need to share the output with someone else,
and your filenames may contain sensitive information,
such a client names.