[Tutor] Permission Report

Alan Gauld alan.gauld at btinternet.com
Mon Oct 8 01:21:59 CEST 2007


"Stephen Nelson-Smith" <sanelson at gmail.com> wrote

> I could use rsync or something to synchronise them, but I would like
> to produce a report of the sort:
>
> Change file: foo from 755 to 775
>
> I'm not sure how best to proceed - I guess walk through the 
> filesystem
> gathering info using stat, then do the same on the new system, and
> compare.

Yes, os.walk and os.stat should do what you want.

There is a dircmp module that may do what you want but I've not
used it.

Alan G 




More information about the Tutor mailing list