Wups: Re: Compare folders and find missing files

Ken D'Ambrosio ken at jots.org
Wed Mar 25 12:54:32 UTC 2020


D'oh.  I checked my one-liner, noted I had a goof or two... and then 
sent it without fixing.
Gonna be that type of day, I'm afraid.  New-and-improved (a/k/a 
"functional") below.

On 2020-03-25 08:52, Ken D'Ambrosio wrote:
[...]
less elegant, is more explicit, and doesn't
> repeatedly walk the compared tree:
cd /media/project && find . -type f | while read fname; do ls
~Documents/sub-tree/$fname > /dev/null 2> /dev/null || echo "$fname
not there."; done
> 
> Note that there will be a superfluous -- but functionally noop -- "./"
> in the path shown of any missing files.
> 
> None of which invalidates the point about diff possibly being the most
> efficient method.
> 
> $.02,
> 
> -Ken




More information about the ubuntu-users mailing list