Comparing two directories

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Comparing two directories

Lee Underwood
I have a directory with graphics in it, i.e., Graphics/example. In order to include it in the shortcuts listing I renamed it, i.e., Graphics/Graphics-example  (or at least that is what I thought I had done.). However, I somehow created a new directory with the files copied to it. Over time, w/o noticing, I have saved files to both sub-directories. How can I compare the two directories to find any different files?

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Comparing two directories

Little Girl
Hey there,

Lee Underwood wrote:

>I have a directory with graphics in it, i.e., Graphics/example. In
>order to include it in the shortcuts listing I renamed it, i.e.,
>Graphics/Graphics-example  (or at least that is what I thought I had
>done.). However, I somehow created a new directory with the files
>copied to it. Over time, w/o noticing, I have saved files to both
>sub-directories. How can I compare the two directories to find any
>different files?

I really like Meld for that. It's in the Ubuntu package manager and
it can compare directories and files. Another good one is FSlint. I
use that for finding duplicate files, but it's capable of a whole
lot more. Or, if you prefer the command line, you could do a dry run
with rsync, which is installed in Ubuntu by default, I believe, and
if it isn't, is in the package manager.

--
Little Girl

There is no spoon.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Comparing two directories

Wade Smart-2
In reply to this post by Lee Underwood
I use Recoll. Its a application in the repo's that
compares one to the other.

--
Registered Linux User: #480675
Registered Linux Machine: #408606
Linux since June 2005

On Tue, Aug 27, 2019 at 5:53 PM Lee Underwood <[hidden email]> wrote:
>
> I have a directory with graphics in it, i.e., Graphics/example. In order to include it in the shortcuts listing I renamed it, i.e., Graphics/Graphics-example  (or at least that is what I thought I had done.). However, I somehow created a new directory with the files copied to it. Over time, w/o noticing, I have saved files to both sub-directories. How can I compare the two directories to find any different files?
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Comparing two directories

Wade Smart-2
In reply to this post by Little Girl
OH BUGGER!!!

Little Girl is right!!
I said Recoll but it is Meld.
I use them both often but just said the wrong thing. :)

--
Registered Linux User: #480675
Registered Linux Machine: #408606
Linux since June 2005

On Tue, Aug 27, 2019 at 6:06 PM Little Girl <[hidden email]> wrote:

>
> Hey there,
>
> Lee Underwood wrote:
>
> >I have a directory with graphics in it, i.e., Graphics/example. In
> >order to include it in the shortcuts listing I renamed it, i.e.,
> >Graphics/Graphics-example  (or at least that is what I thought I had
> >done.). However, I somehow created a new directory with the files
> >copied to it. Over time, w/o noticing, I have saved files to both
> >sub-directories. How can I compare the two directories to find any
> >different files?
>
> I really like Meld for that. It's in the Ubuntu package manager and
> it can compare directories and files. Another good one is FSlint. I
> use that for finding duplicate files, but it's capable of a whole
> lot more. Or, if you prefer the command line, you could do a dry run
> with rsync, which is installed in Ubuntu by default, I believe, and
> if it isn't, is in the package manager.
>
> --
> Little Girl
>
> There is no spoon.
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Comparing two directories

Olivier Nicole-2
In reply to this post by Lee Underwood
Lee Underwood <[hidden email]> writes:

> I have a directory with graphics in it, i.e., Graphics/example. In order to include it in the shortcuts listing I renamed it, i.e., Graphics/Graphics-example  (or at least that is what I thought I had done.). However, I somehow created a new directory with the files copied to it. Over time, w/o noticing, I have saved files to both sub-directories. How can I compare the two directories to find any different files?

diff -r directory1 directory2

It will tell you what directory exists only in one hierarchy, whay files
are uniques, what files exist with the same name but different contents.

Olivier

--

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Comparing two directories

Volker Wysk
In reply to this post by Lee Underwood
Am Dienstag, den 27.08.2019, 18:38 -0400 schrieb Lee Underwood:
> I have a directory with graphics in it, i.e., Graphics/example. In
> order to include it in the shortcuts listing I renamed it, i.e.,
> Graphics/Graphics-example  (or at least that is what I thought I had
> done.). However, I somehow created a new directory with the files
> copied to it. Over time, w/o noticing, I have saved files to both
> sub-directories. How can I compare the two directories to find any
> different files?

"diff -r --brief" shows the differences of two directory trees. You
might also use "fdupes", which finds duplicates. You can also delete
them with it.

See the man pages for details.

Cheers
Volker


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Comparing two directories

Lee Underwood
In reply to this post by Olivier Nicole-2
Thanks! This worked great!

I also installed Meld and will be trying that out as well.

Thanks for the help!



On Wed, Aug 28, 2019, Olivier <[hidden email]> wrote:

> Lee Underwood <[hidden email]> writes:
>
> > I have a directory with graphics in it, i.e., Graphics/example. In order to include it in the shortcuts listing I renamed it, i.e., Graphics/Graphics-example  (or at least that is what I thought I had done.). However, I somehow created a new directory with the files copied to it. Over time, w/o noticing, I have saved files to both sub-directories. How can I compare the two directories to find any different files?  
>
> diff -r directory1 directory2
>
> It will tell you what directory exists only in one hierarchy, whay files
> are uniques, what files exist with the same name but different contents.
>
> Olivier
>
> --
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users