Topic: Compare Directories; Find Which Files Are Different (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30653" 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>\

 
Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 11-15-2008 19:25

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.

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana
Insane since: Aug 2000

posted posted 11-15-2008 20:16

Hi Wes,
Use
> 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

posted posted 11-16-2008 12:22

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

PaulBM
Bipolar (III) Inmate

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

posted posted 11-17-2008 10:24

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:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu