What I am looking for is a directory 'diff' tool.
September 24, 2004 11:06 AM   Subscribe

What I am looking for is a directory 'diff' tool. I have two identical directories, fairly deeply nested, with lots of files. I want to modify some files in one of the directories, run the 'diff' tool against the two directories, and have it return a list of files have been modified. I am familiar with grep and diff, however I am unsure as to how to format this exact request. [mi]

So work has furthered intruded on my life, and they would like me to start working at home as well :) So I plan on taking the entire website home, and modifying various files, but I only want to bring back the files that I change. I could do sort by date on the file list, but since the directories are nested, I might miss some. I am working on Win2K if that makes a difference.

Any other suggestions would be appreciated as well. The project is also backed to a database, but I'll just write an update script for all changes I make, so no real problem there.
posted by patrickje to Computers & Internet (9 answers total)
 
Anything wrong with
diff -r <dir1> <dir2>
Add "-q" if you only want a list of differing filenames, otherwise you'll get the details of the changes too.
posted by spacewrench at 11:10 AM on September 24, 2004


Oops, posted before I saw the rest of the question. On W2K, I'd install Cygwin, which gives you a tolerable unix-like environment.

Also, look into rsync. That makes it easy to maintain sync'd directory trees.
posted by spacewrench at 11:13 AM on September 24, 2004


Beyond Compare
posted by golo at 11:22 AM on September 24, 2004


If you're going to be doing stuff like this often, you might want to bring your files under a version control system, e.g. CVS or Subversion.
posted by Eamon at 11:29 AM on September 24, 2004


Thanks golo, exactly what I was looking for. Exactly.
posted by patrickje at 11:37 AM on September 24, 2004


are you sure? cvs and subversion are harder to learn, but are designed exactly for what you describe - working on code from more than one location. in comparison, beyond compare looks like a nice, easy to use gui tool that will help you do what you want, but which is more general/less exactly tailored to this particular case, and which will be more time-consuming and less reliable over the long term.
you might want to try out beyond compare now, but keep cvs/subversion in mnd for later.
posted by andrew cooke at 1:03 PM on September 24, 2004


Hmmm.... we already are using source control, however, the site is an intranet, and behind a firewall. And so is our source control. I have worked with remote source control products, and since I am one of three developers on the project, I don't feel the need to spend any money or time on getting remote source control up and running.

And I'm going to be working on the site on my laptop with no internet connection. So the product is that golo specified is exactly what I'm looking for. I'll check in only files that I worked on when I get back in the office.

I also have the luxury of not having to resolve/merge differences since the other developers do not touch most of the areas that I do. I was just looking for a quick and dirty solution.
posted by patrickje at 2:27 PM on September 24, 2004


If you're on XP, you can also get WinDiff in the SP 2 Support Tools download, which I was able to download and install without SP2 (I just needed it for WinDiff).
posted by DakotaPaul at 4:51 PM on September 24, 2004


i'm not a technical guy, but i think justin frankel's pathsync might be worth looking into.
posted by lotsofno at 11:12 PM on September 24, 2004


« Older Opossums   |   Capitalizing on a spike of traffic? Newer »
This thread is closed to new comments.