The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Awk - to test multiple files "read" permission ? lokiman Shell Programming and Scripting 1 02-09-2008 09:10 AM
ls while read loop - internal read picking up wrong input dkieran Shell Programming and Scripting 2 05-14-2007 12:02 PM
Permission file questions--Please read!!! bobo UNIX for Dummies Questions & Answers 4 02-10-2007 08:03 PM
read line and read next ariuscy UNIX for Dummies Questions & Answers 7 09-21-2005 04:04 AM
read permission but cant ls -l it. Optimus_P UNIX for Advanced & Expert Users 6 04-23-2004 09:10 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 05-22-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
Quote:
Originally Posted by System Shock
.. or for those of us who do not like to type that much

ls -l

and quickly scan the permissions column
There isn't a command that shows you which files are readable because all files are created readable. You'd have to manually make a file unreadable, so it makes no sense to have a command that displays only readable files, since 99.99% of files are readable.
not necessarily,
what if the files are created with read mode permission bit masked off?
(Ideally nobody would have opted that way)
Reply With Quote
Forum Sponsor
  #9  
Old 05-22-2006
Registered User
 

Join Date: Feb 2006
Posts: 18
I think what you're looking for is the find command:
Code:
find -perm 644 -maxdepth 1
With the -perm flag, find will return files that match the given permissions. It checks all files in the current directory and through each subdirectory of the current directory - hence the "maxdepth 1" which makes it only search the current directory.

As stated, just about every file on the system is readable by someone. By using find you can specify whether to return files that are group or world readable.

Here's the man page on find: http://linux.about.com/od/commands/l/blcmdl1_find.htm
And this spells out usage fairly well: http://www.linux.ie/newusers/beginne...guide/find.php
Reply With Quote
  #10  
Old 05-22-2006
System Shock's Avatar
Registered User
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 395
Quote:
Originally Posted by matrixmadhan
not necessarily,
what if the files are created with read mode permission bit masked off?
(Ideally nobody would have opted that way)
..so what if they are? Still, there's no command that specifically will show you what's readable or not.

The solution presented above by this213 is as good as it gets, however, it is not a command that will specifically tells what's readable or not, but rather looks for specific permissions, which is not the same thing.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0