LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   recursively list files and dirs based on permission (https://www.linuxquestions.org/questions/linux-software-2/recursively-list-files-and-dirs-based-on-permission-592353/)

sneakyimp 10-16-2007 05:30 PM

recursively list files and dirs based on permission
 
I'd like to find a command that recursively lists all folders and files which are group-writable. This *almost* works except I need the command to list the entire path rather than just the filename. I.e., '/path/to/matching/file.jpg' rather than just 'file.jpg'

Code:

ls -Rl | grep '^....rw'

unSpawn 10-16-2007 05:42 PM

You don't want the listing but the "find" command.

sneakyimp 10-16-2007 06:37 PM

cheers! This is working like a charm:
Code:

find -perm -g=rwx
and *this* lets me set the permissions i wanted to...hotcha!
Code:

find -perm -g=rwx -exec chown -v myplanadmin.apache {} \;


All times are GMT -5. The time now is 02:07 AM.