LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-16-2007, 06:30 PM   #1
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Rep: Reputation: 50
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'
 
Old 10-16-2007, 06:42 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,699
Blog Entries: 54

Rep: Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962
You don't want the listing but the "find" command.
 
Old 10-16-2007, 07:37 PM   #3
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Original Poster
Rep: Reputation: 50
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 {} \;
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
list recursively files with for xeon123 Programming 6 04-04-2007 04:38 PM
vsftpd: Cannot list files, but can change dirs beebopbogo Linux - Networking 9 02-13-2007 03:30 PM
how to remove long-windows-filename files based on exlusion list adamrosspayne Linux - Newbie 3 06-23-2006 03:25 AM
List all files and recursively open directories. unreal128 Linux - General 2 07-16-2005 03:06 PM
Can ls recursively list only directories? Vosper Linux - General 3 07-16-2005 04:57 AM


All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration