LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 10-16-2007, 05:30 PM   #1
sneakyimp
Member
 
Registered: Dec 2004
Posts: 762

Rep: Reputation: 48
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, 05:42 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,534
Blog Entries: 51

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

Original Poster
Rep: Reputation: 48
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 09:13 PM.

Main Menu
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