12

Does there exist a tool that compare Directory tree (Files. sub dirs) and show you waht is missing. I have an upload too which I'm coding and would like to see if it does not mess with structure.

Nothing big just show me how does directory X compare with Y

To clarify more here is an example

The tree

Dir1+
     +Subdir1
     +sudir2
        +File1
        +File2

and the tree

Dir1+
     +Subdir1
     +sudir2
        +File1
        +File2

are the same but tree

Dir1+
     +Subdir1
     +sudir2
        +File1
        +File2

and tree

Dir1+
     +Subdir1
     +sudir2
        +File1
        +File3

Should show me that File2 is missing and File3 is added.

Does such a tool exists?

5

A less technical approach would be to use gui synchronization software such as FreeFileSync (Visual folder comparison and synchronization)

There is a ppa at launchpad:

Put these lines in a terminal:

sudo add-apt-repository ppa:freefilesync/ffs
sudo apt-get update
sudo apt-get install freefilesync

I've successfully been using this tool for a few years now to back-up and/or sync folders on Windows and Ubuntu.

See this screenshot I set-up displaying what it would do in your situation:

enter image description here

11

Meld is a very good graphical diff tool (and more):

meld dir1 dir2 &

enter image description here

  • I will give it a try. Hope it does all I have posted above! – Stefano Mtangoo Jun 19 '13 at 11:21
9

diff can compare directory trees, too.

diff <dir1> <dir2>

Or if you don't want to see the files content differences:

diff -q <dir1> <dir2>

Some graphical tools available in Ubuntu repos: dirdiff, fldiff, kdiff3, meld, mgdiff.

  • thanks. Is there a graphical frontend? – Stefano Mtangoo Jun 19 '13 at 10:57
  • 2
    For a tree comparison, you need to go recursive. You need the -r option or it will be wrong. Could be a disaster too. – H2ONaCl Dec 29 '15 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.