Regarding coparing file attributes in different directories.,
Hi Anybody,
I have one scenario to be tackled out. I have some files in this directory /www/aff/cgi-bin/ and this directory /www/cgi-bin/ and file contents are exactly same and I could get if any mismatch using diff command,but I wanted to know is there any file permission change ,groups are change etc (basically file attributes I have to compare),How I can do this? any help greatly apprciated. Thanks, Praveen. |
You could use something like the following to diff the stat output for a pair of files. It would need a wrapper script to be practical for use on a large number of files though:
Code:
diff <(stat file1.log | egrep 'Access.+Uid.+Gid') <(stat file2.log | egrep 'Access.+Uid.+Gid') |
All times are GMT -5. The time now is 12:52 PM. |