MetaChat REGISTER   ||   LOGIN   ||   IMAGES ARE OFF   ||   RECENT COMMENTS




artphoto by splunge
artphoto by TheophileEscargot
artphoto by Kronos_to_Earth
artphoto by ethylene

Home

About

Search

Archives

Mecha Wiki

Metachat Eye

Emcee

IRC Channels

IRC FAQ


 RSS


Comment Feed:

RSS

13 September 2008

AskMecha: *nix geeks, what's the best way..... to compare contents of two folders (that have lots of subfolders) - I copied them ages ago but fear I lost a few files along the way and now I'm stumped as to how I best check for missing files!
Ls -R on both folders and then do a diff. ?
Not that I know too much on this.

I also belive sdiff can compare folders.
posted by seanyboy 13 September | 05:39
diff -r [DIR 1] [DIR 2]

Will tell you which files (if any) exist only in one directory or the other. I think that's what you want.
posted by cmonkey 13 September | 08:59
Try Allway Sync. This is a free file backup program that synchronizes the contents of two folders (including subfolders). The full (paid) version will do more files, but it sounds as if the free version will do what you need. This is a neat program that can be trusted -- I use it for backup all the time.
posted by Susurration 13 September | 19:17
Shoot - I just realized that you need a Unix solution. OK, going with sdiff then ... :-)
posted by Susurration 13 September | 19:29
rsync -aP ~/somefolder ~/someotherfolder


...will copy over the difference.
posted by pompomtom 14 September | 04:26
Heya all.

Thanks for the helpful input, I've tried diff and got no results, which is odd. I'm trying to avoid rsync, mistyping that command made me get in trouble in the first place hehehe. Diff reckons there's no difference between the folders which is odd, because when you go check for films on the website, clearly some have gone missing. My problem is that I can not find the missing films in the original folders (because there is no difference) ArghHHHH!

Picture also a really stupid system of folders named by year, and then each month in that year inside a huge folder that has only grown bigger for years and years. It's not just 2004 that might be the bad year, for example.

Anyway, downloading it all home (only 16 more hours of that) so at least when I get rid of the old folder on the server I'll have backup here.
posted by dabitch 14 September | 09:46
...also, the missing files may be caused by really stupid symlinking that I've forgotten about. I'll go through each year by hand instead. duh me.
posted by dabitch 14 September | 09:48
U.S. Politics on Metachat... || Champion Bunnies!

HOME  ||   REGISTER  ||   LOGIN