![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| user & group read/write access question | Katkota | UNIX for Dummies Questions & Answers | 3 | 08-28-2008 09:30 PM |
| group & user permission question | Katkota | UNIX for Dummies Questions & Answers | 10 | 08-14-2008 02:37 PM |
| Newly created files default group and write permissions | goldfish | UNIX for Dummies Questions & Answers | 2 | 02-20-2008 06:39 PM |
| how to read or write device files | sriram.ec | UNIX for Dummies Questions & Answers | 1 | 01-03-2006 05:27 PM |
| Script with read/write Files | steiner | Shell Programming and Scripting | 5 | 07-25-2003 10:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Find all files with group read OR group write OR user write permission
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true and and user write = true. how do I make it show me where group read = true, OR group write = true OR user write = true? Thanks! |
|
||||
|
I decided I didnt want to see anythink that was a link ( only files and directories).
I also wanted it sorted by the directory name which I put in the 4th column of my output file. Here is what I ended up with: find . -type d \( -perm -g=w -o -perm -o=r -o -perm -o=w \) -ls | awk '{print $3 " " $5 " " $6 " " $11}' > /home/shunter/findperm.tmp find . -type f \( -perm -g=w -o -perm -o=r -o -perm -o=w \) -ls | awk '{print $3 " " $5 " " $6 " " $11}' >> /home/shunter/findperm.tmp cat /home/shunter/findperm.tmp | sort -k4 > /home/shunter/findperm.txt rm /home/shunter/findperm.tmp Thanks for your help! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|