Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.lang.perl Subject: Re: Dcmp - recursive directory comparison Message-ID: <125391@uunet.UU.NET> Date: 12 Mar 91 23:11:16 GMT References: Organization: UUNET Communications Services, Falls Church, VA Lines: 30 lgy@phys.washington.edu (Laurence G. Yaffe) writes: > > I frequently use a recursive directory comparison program to compare >the contents of entire directory trees. I recently decided to rewrite >my previous shell based 'dcmp' program in Perl (and of course, add various >bells and whistles). Appended below is the result (my first serious Perl >programming). If others find it useful, great. Comments on Perl programming >style welcome. Funny how things tend to get invented at about the same time. I am planning to post my version soon. It does have one other feature, in that it removes identical versions from one half of the tree. > By default, this program reports on files present in one directory tree, >but absent in the other, and files present in both trees but with differing >contents, ownerships or permissions. 'Diff' may run on differing text files >to display differences. Its output is designed to be terse but informative. >(I find the sysV "dircmp" unpleasantly verbose and insufficiently flexible.) >It's wrapped with its own man page (but not shar'ed). So get GNU diff instead. It does recursive comparison nicer. I will look at your version more thoroughly soon. However, one thing SCREAMS for attention. DON'T FOLLOW SYMBOLIC LINKS BY DEFAULT! This is a dangerous thing to do in any program that deals with the filesystem as a recursive structure. -- [rbj@uunet 1] stty sane unknown mode: sane