Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!umd5!brl-adm!adm!dsill@nswc-oas.arpa From: dsill@nswc-oas.arpa (Dave Sill) Newsgroups: comp.unix.wizards Subject: File checker: A summary Message-ID: <16608@brl-adm.ARPA> Date: 22 Jul 88 19:19:01 GMT Sender: news@brl-adm.ARPA Lines: 49 Previously, I wrote: > Subject: File checker > Is there a free utility that reads a file containing a list of files > and their modes/owners/groups, compares them to the actual files, and > either reports the inconsistencies or corrects them? Just thought I'd > check before I re-invent. Following is a summary of the replies I've received to date. 1) Two people suggested short awk/ls/diff-based scripts. For my purposes, this is inadequate. I need to check about 1500 files and any form of shell script would just be too slow. 2) Three people mentioned that there is a nice script in "UNIX Security" by Kochan and Wood that does this. Again, too slow for me. 3) One person suggested that such a utility would be useful if it was quick enough. 4) One person suggested trying `cfs' by Rex Sanders. I was unable to reach him. 5) One person suggested that the PD stat program might be useful. True, but not a complete solution. 6) One person volunteered his own unfinished program to do this (Wade Stebbings, wade@violet.berkeley.edu). I would have taken him up on this, had I not already received number 7... 7) Dave Curry gave me a copy of his program `fcc', File Consistency Checker. This turned out to be everything I wanted. It consists of two programs: fcc and fci. Fci takes a list of files and produces a data file for fcc based on the current stats of each file. Fcc compares the data file against the current file system and, depending on how you call it and how you have your data file set up, reports differences in mode, owner, group, file type, link count, size, and modification time. An option to fcc causes it to try to correct owner, group, and mode inconsistencies. On my unloaded tahoe it takes 30 seconds to check 1500+ files. On a lightly loaded 780 it takes a minute to check 1300+ files. I've made several changes to fcc and fci, and have Dave's permission to distribute copies of the source, which includes a makefile and man pages, to anybody that wants them. Drop me a line and I'll send you the shar file. Thanks to all who replied. -Dave