How to compare/diff recursively owner and group of directories?

Unknown Crewman unknown.crewman at rocketship.com
Sun Jan 11 21:38:36 UTC 2015


On Sun, 11 Jan 2015 12:54:00 -0800 David Christensen wrote:
> On 01/11/2015 04:47 AM, Unknown Crewman wrote:
> > any idea how to check recursively, if the owner and group of a
> > directory and it's content differs to an directory and it's content
> > from a backup? I made a mistake and it's unlikely that owner and
> > group of any file or directory changed, but it's not impossible, so
> > I want to compare everything with a backup directory. diff/find?
> 
> One idea would be a shell one-liner pipeline using find, sort, xargs, 
> stat, and/or cut, run once for each tree, put the output into text 
> files, and then diff the text files.  Here's an StackExchange thread 
> that discusses sorting in the face of filenames containing spaces:

Thank you,

my idea was similar, I was thinking about using ls and cut and perhaps something else and then compare both trees (files) using meld, since meld seems to be smarter regarding files that are just in one of both trees (files), than diff is. Sometimes diff becomes unreadable.

> Another option is Perl. [snip] You could hack it up to check
> uid and gid for directories and files

Maybe or maybe not, since I never used Perl. It's likely to risky.

I didn't take a look at the links yet, but I will do so soon.

Regards,
Ralf



More information about the D-community-offtopic mailing list