|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Permission Comparision
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..!!! |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
This is very vague. Do the files in the different directories have all the same names? If so, this finds differences in permissions : Code:
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"} |
| The Following User Says Thank You to jim mcnamara For This Useful Post: | ||
yanis (02-16-2012) | ||
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk: string followed by tab comparision | ysvsr1 | Shell Programming and Scripting | 3 | 01-30-2012 11:34 PM |
| File comparision with AWK / SED | mrpugster | Shell Programming and Scripting | 1 | 03-25-2011 07:08 AM |
| while - comparision | sharif | Shell Programming and Scripting | 2 | 11-01-2007 05:58 AM |
| date comparision | Hitesh Shah | Solaris | 1 | 10-26-2007 07:35 AM |
| SuSE comparision | lungs | SuSE | 8 | 02-12-2005 12:36 AM |
|
|