Hi,
I need to know how to compare the permissions of files which are in two different directories in Unix..
Experts - can any one help on this..!!!
Hi,
I need to know how to compare the permissions of files which are in two different directories in Unix..
Experts - can any one help on this..!!!
This is very vague. Do the files in the different directories have all the same names?
If so, this finds differences in permissions :
ls -l /path/to/dir1 > file1
ls -l /path/to/dir2 > file2
awk ' FILENAME=="file1" {arr[$(NF)]=$1}
FILENAME=="file2" { print $(NF), (arr[$(NF)] == $1)? "matches": "no match"}