Topic: Compare Directories; Find Which Files Are Different (Page 1 of 1) Pages that link to <a href="" title="Pages that link to Topic: Compare Directories; Find Which Files Are Different (Page 1 of 1)" rel="nofollow" >Topic: Compare Directories; Find Which Files Are Different <span class="small">(Page 1 of 1)</span>\

Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

IP logged posted posted 11-15-2008 19:25 Edit Quote

OK, so I received such a great solution to my last problem, that I thought I'd ride the wave and present my next one.

I created a dev version of my site where I could make some updates that I then planned to incorporate into my live site. Unfortunately, I did a dumb thing and got sick, and forgot what changes I made by the time I got back to them.

So, what I need to do is compare the directories recursively (we're talking Linux here) and find out which files are different. I can't just go by date since some of the files on the live site have changed, as well. I need to find out which files are actually different by content.

BTW, I know how to use diff to create a patch file, which I plan to use once I've discovered which of the files have changed, but first I need to find those files.

Paranoid (IV) Inmate

From: Madison, Indiana
Insane since: Aug 2000

IP logged posted posted 11-15-2008 20:16 Edit Quote

Hi Wes,
> diff -r <directory-1> <directory-2> | more


-- not necessarily stoned... just beautiful.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

IP logged posted posted 11-16-2008 12:22 Edit Quote

or learn to use one of the distributed version control systems such as mercurial - they're worth their code in gold, sometimes.

Bipolar (III) Inmate

From: East Anglia, England.
Insane since: Sep 2003

IP logged posted posted 11-17-2008 10:24 Edit Quote

I've started experimenting with DropBox. It's ideal for syncing files from multiple locations and it allows you to restore older files. So has it's own version of version control.
It also only sends the changes to files, so is efficient on bandwidth. Oh, and 2gb is free (so far).

Post Reply
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
Your Text:
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu