VERSION 2.3 =========== The source RPM builds at least on RH8, FC1 and FC4. It requires a 2.6.8 or higher linux kernel because of the open(1) O_NOATIME flag. The binary has been built on FC4. Except for O_NOATIME the program also works on a SUN SparcStation with Solaris 10 (not investigated any further). Example output: drwxr-xr-x fvm sec 20070819 19:27:38 . - -rw-r--r-- fvm sec 19970704 19:38:59 COPYING yTwFUL0xc/RQSyy9iZHlCw -rw-r--r-- fvm sec 20070819 15:03:17 Makefile /CZncc5eYjcGl+Mk6B9A9A -rw-r--r-- fvm sec 20070813 20:57:14 cpio.c amZpTbUN7yrPvvNILTp03Q -rw-r--r-- fvm sec 20070819 15:26:23 cpio.h Glltuk0/cE6zHx5E3dsyHQ -rw-r--r-- fvm sec 20070807 20:53:41 digest.c Ap5Uj/RsJLbk/CbvJoaEPw -rw-r--r-- fvm sec 20070819 15:26:29 digest.h 2EGt7gu/gh+AOZvGZAgCig -rw-r--r-- fvm sec 20070819 18:41:32 fs.c gXLtT8U69BdOyaRre+Q8UQ -rw-r--r-- fvm sec 20070819 15:23:34 fs.h AkA+4o3C5Anb+d8FRWSxmw -rw-r--r-- fvm sec 20070819 18:52:54 fsindex.1 fnqM7/Ur7R0vEtFpEBtqZA -rw-r--r-- fvm sec 20070819 18:53:12 fsindex.c ZbCfkCbNbgxO9T3RAQ/j3A -rw-r--r-- fvm sec 20070819 16:10:46 fsindex.h 03kZxi6YeOnBhaQ76wHo0w -rw-r--r-- fvm sec 20070819 14:48:32 fsindex.spec FPOoG6Fi0NjZBuZ4ZIhg+Q -rw-r--r-- fvm sec 20070819 15:26:58 list.h 0rSaMsSarEfDw1lddX9LYg -rw-r--r-- fvm sec 20070204 17:13:20 md5.c XiqfSM6g2XMT1y+qYyfcGg -rw-r--r-- fvm sec 20070201 22:12:07 md5.h 8lnuSNDc8SxcHG8neeeaFA -rw-r--r-- fvm sec 20070212 22:34:40 repr.c PMMntpAfhdQquZwqk1X6kg -rw-r--r-- fvm sec 20070819 15:27:04 repr.h 07NW97T/+m1kww4L1Dp13w -rw-r--r-- fvm sec 20070212 21:18:10 rt.c XDAFJ60wsAvZDTiRl2oZmg -rw-r--r-- fvm sec 20070819 15:27:08 rt.h I3NwR4jtnWH5yR67lvuGTA -rw-r--r-- fvm sec 20070204 17:13:12 sha256.c PfYQIVmao6uUx6q21X5TeQ -rw-r--r-- fvm sec 20070203 14:12:09 sha256.h hMn97G8TKT3jDMe/jDKDFA From the manual page: FSINDEX(1) FSINDEX(1) NAME fsindex - create a directory tree index with digests SYNOPSIS fsindex [option...] [arg...] [option...] MOTIVATION This program has originally been written to independently verify the result of copying a really large directory tree from an old disk to a new one. If there is something wrong one might not notice it in time otherwise: the copied files may be accessed long after the old disk has been discarded and backup tapes have been rotated. On one occasion fsindex detected RAM bitflips: 1 bit error per 20GB on average while migrating 150GB of data, due to critical RAM timings on the new system. Software is bug-prone too. fsindex has detected several bugs in rsync(1), tar(1) and cpio(1) while verifying backups. So, when your data is valuable to you then independent verification can be important. Verification with other tools is often troublesome and tends to be unpractically slow when the amount of data is really large. Also, the modification time of something not a file or directory and symbolic link permission bits are meaningless in this case. But they do obfus- cate any interesting change. fsindex tries to minimize disk seeks by traversing directory trees in inode order but without bypassing the filesystem layer. As a result it can be 2-3 times as fast as find(1) and tar(1) on an ext3 filesystem. To increase performance further it has built-in MD5 and SHA256 support and will open directories and files with O_NOATIME automatically when root. fsindex handles link-forests produced by (for example) "cp -al" or "rsync --link-dest" efficiently which standard cpio does not. This is why it has some built-in cpio output support. The fsindex program can also be used to track file-system changes caused by installers which insist to be run as root. DESCRIPTION Without options, fsindex generates a directory tree index containing one line per file-system object. Every line is divided into three tab- separated fields. The first field contains ls -l style mode, owner and group information. The second field contains the date/time last modi- fied and the pathname. The last field contains a digest for regular files, symbolic link contents for symbolic links, device information (rdev) for device inodes and a dash for everything else. Symbolic links always appear to have mode 0755. When not a directory or regular file the date/time last modified is replaced by dashes. In pathnames and symbolic link contents a tab is replaced by \t, linefeed by \n, escape by \e (to make output tty safe) and backslashes are doubled. The output is sorted on pathname on argument basis, in "C" locale. Argu- ments are sorted similarly. OPTIONS -bblocksize[unit] Set the output blocksize for cpio output and pad the last block with zeros accordingly. The default is 1 meaning one 512-byte block. The optional unit suffix can be b (default), c, k or M for counting in 512-byte blocks, characters, 1024-byte blocks (a.k.a KiB) and 1048576-byte blocks (a.k.a. MiB) respectively. -ddigest Choose the digest method for regular files. The default is md5 since it is suitable for detecting corruption but doesn't require too much processing power to compute. However, MD5 is no longer considered safe for security applications. Fsindex also supports sha256 for that purpose (FIPS-180-2). Both MD5 and SHA256 algorithms are identical to their respective command-line versions except that fsindex uses RFC1521 compliant base-64 encoding for compactness. The digest none means no digest, printing a single dash. When specifying size the digest will be set to the hexadecimal size of the file according to stat(2). In both cases the file will not be read at all. Specify read to read the file in addition to printing its size. This might be useful for a media check. -fformat Choose the output format. The default is fsi, a nicely formatted directory tree listing for verifying tree copies. path will print null terminated pathnames and cpio will generate the portable SVR4 cpio archive format, like cpio -Hnewc. The fsi format output is sorted on pathname. The others are sorted on device/inode number except that directories are emitted after the contents: The first pass emits all leaf objects in device/inode number order and a second pass emits the non-leaf objects (i.e. non-empty directories), again in device/inode num- ber order. -i Print inode number. This adds a space plus inode number in hex to the last field. -Ipath Include path in the traversal, even when it is a mount-point and -x has been specified. This option accumulates. When it is not a mount-point or -x has not been specified then the option has no effect. This option is useful when one argument is a subtree of another. For example, when specifying . and ./home as arguments assuming the second is a mount-point then the output will be two independently sorted trees which might not be what you want. To get one sorted tree, specify all subtree mount-points using the -I option instead of mentioning them as arguments. -l Print the relative (in-tree) link count. This adds a space plus a decimal number to the last field, after the optional inode number. Directory link counts tend to be 1 because special entries . and .. in subdirectories are excluded anyway. When program arguments overlap (possibly due to bind-mounts) then the directory link count will increase. Directories "hard-linked" this way will still be descended into. -n Print numerical user and group ids instead of their name. This may be useful for verifying back-up copies made via the network on systems with different passwd/group entries: you might want to make sure to preserve the exact uid/gid numbers. -v Increase verbosity. This will print time stamps and some statis- tics on standard error. -V Print version of fsindex and exit. -x Do not cross mount points. See the -I option to compensate for that. -Xpath Exclude path and anything below from the process. This option accumulates and overrules -I options. --debug Print some debug information (currently: radix trees before exit). --hex Print md5 and sha256 digests in hexadecimal notation instead of base-64. --localtime Use the local time zone instead of UTC. --noatime Preserve access times. This option is always on when the effec- tive user is root. --nostrip Do not strip a leading "./" and redundant "/" from pathnames in the output. DIAGNOSTICS The exit code is 0 on success, 1 for nonfatal errors such as opening and read errors. Anything more serious will result in exit code 2. SEE ALSO diff(1)