The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 12:10 PM
ls while read loop - internal read picking up wrong input dkieran Shell Programming and Scripting 2 05-14-2007 03:02 PM
Permission file questions--Please read!!! bobo UNIX for Dummies Questions & Answers 4 02-10-2007 11:03 PM
read line and read next ariuscy UNIX for Dummies Questions & Answers 7 09-21-2005 07:04 AM
read permission but cant ls -l it. Optimus_P UNIX for Advanced & Expert Users 6 04-23-2004 12:10 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-19-2006
vineetrocks2005 vineetrocks2005 is offline
Registered User
  
 

Join Date: May 2006
Posts: 3
Read Permission

How can view the list of only those files & directories which have read permission..!
  #2 (permalink)  
Old 05-19-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,930
-r is the option
to check whether file/directory has read permission or not!!!
  #3 (permalink)  
Old 05-19-2006
vineetrocks2005 vineetrocks2005 is offline
Registered User
  
 

Join Date: May 2006
Posts: 3
what do u mean by -r
Can u pls tell me how can i use it
  #4 (permalink)  
Old 05-19-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,930
here is a sample that u can use it ,
Code:
if [ -r filename ] 
then
echo "readable"
else
echo "not readable"
fi
  #5 (permalink)  
Old 05-19-2006
vineetrocks2005 vineetrocks2005 is offline
Registered User
  
 

Join Date: May 2006
Posts: 3
This is the code to check whether the file is readale or not but is there any command that show me the list of all readable files.for eg:-

ls -a shows all the hidden files & directories
  #6 (permalink)  
Old 05-20-2006
System Shock's Avatar
System Shock System Shock is offline Forum Advisor  
Registered User
  
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 521
.. 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.
  #7 (permalink)  
Old 05-22-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,930
Quote:
Originally Posted by vineetrocks2005
This is the code to check whether the file is readale or not but is there any command that show me the list of all readable files.for eg:-

ls -a shows all the hidden files & directories
what i gave could serve only as a starter to proceed with !!!
you can use that to acheive ur objective of determining list of all readable files/directories.
Sponsored Links
Closed Thread

Bookmarks

Tags
linux, linux commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:22 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0