I have two folders.
A is an older version of B, having been copied at some point.
There may be changes in A but that are not in B.

I wanna find out if there are any, and what they are if they exist.

How do i do that, preferably using Linux standard utils

@4censord the diff util?

@16af93 @hannah these ones both recomended diff
that does technically work, but this is a 500Gb 150k files folder

so may not be that ideal to then sort through

@4censord @16af93 Ah. That indeed complicates things a little.
Though... if the directories are really big then any approach will most likely take huge amounts of time.

@4censord Every time I've done this I've just

```bash
cd dir1
find . -type f | xargs md5sum > ../a
cd dir2
find . -type f | xargs md5sum > ../b

diff a b
```

Probably not the best but works on most systems

@4censord that’s a tricky question
you just want to know what’s missing or updating state from A and B?
@hypha i want to integrate changes that have been done in A into B,
but selectivly
because there are changes i dont care about, but i dont know which ones yet
@4censord hmmm
what is a change? a missing file or the content has change?
@hypha both :/
@4censord hmmm
as far as i know there is no interactive way of doing this
the silly way i would suggest is using git repo (one for A and another for B) and doing merges (with conflicts to solve), having the other as remote to the other
@4censord you could check where the modified date of the file in A is newer than the same file in B, or that the file in A does not exist in B
then you could run diff on just those files
@4censord diff has a -r flag
also, git diff works on directories, even if not in a repo

@4censord I'd use `git diff --no-index A B`. The flag means it doesn't expect the folders to be in Git at all, just does the normal Git diff algorithm on their contents.

That's partly because I use Git all the time and like its diff behavior.

A more old-fashioned / classic-tools solution, with GNU diff: `diff -Nur`, or `diff -Nqr` first for a summary.

@4censord Another approach, if the changes that are new in B are too numerous and drown out the A changes in a full diff: you could look at the file modification times in A, if you trust those.

So e.g. `find A -newermt '2025-01-01'` to list files touched since the given date. You can also name some other file in order to use its mtime as the comparison point; look in `man find` under "newerxy".

@gregprice ohhhh thats so good
I had no idea this flag exists at all

Thanks!