You are not logged in.

#1 2009-08-16 13:24:37

Mountainjew
Member
From: Ireland
Registered: 2008-08-24
Posts: 405

Comparing folder contents? [Solved]

So here's my problem. I have my music directory with about 3000 folders inside, and i also have a backup on another drive. But the number of contents are mismatched. Is there any way to compare the folders without having to go through each one and tick it off? Is there any kind of program that can do this for me? I've tried searching on the subject but can't find anything. Basically i'm just trying to find out what's missing in one of the directories.

Last edited by Mountainjew (2009-08-16 13:57:13)

Offline

#2 2009-08-16 13:47:03

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Comparing folder contents? [Solved]

"diff -r dir1 dir2" would show you if a file or directory is only present in one place.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2009-08-16 13:51:01

cinan
Member
From: Slovakia
Registered: 2008-07-04
Posts: 251
Website

Re: Comparing folder contents? [Solved]

try
'diff -r --from-file=directory1 directory2'
Maybe 'man diff' helps you smile

//edit: oops, loafer was faster

Last edited by cinan (2009-08-16 13:51:31)

Offline

#4 2009-08-16 13:56:42

Mountainjew
Member
From: Ireland
Registered: 2008-08-24
Posts: 405

Re: Comparing folder contents? [Solved]

Awesome, thanks a lot smile

Offline

#5 2009-08-16 20:33:39

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: Comparing folder contents? [Solved]

For vim fans:
:e dir, then vert diffsplit other/dir

Offline

#6 2009-08-19 19:32:05

Teoulas
Member
From: Athens, Greece
Registered: 2009-03-21
Posts: 70

Re: Comparing folder contents? [Solved]

And there's meld if you want a GUI app for your diff needs.

Offline

Board footer

Powered by FluxBB