Topic: Compare Directories; Find Which Files Are Different 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" rel="nofollow" >Topic: Compare Directories; Find Which Files Are Different\

 
Author Thread
Wes
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.

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana
Insane since: Aug 2000

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

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

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.

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


« BackwardsOnwards »

Show Forum Drop Down Menu