
Permission checks in shell script
A reader of my new book Wicked Cool Shell Scripts pointed out that the capability of testing a file permission with find using the '+' notation is GNU-specific.
Specifically, in script #49, findsuid, the line: for match in $(find /bin /usr/bin -type f -perm +4000 -print)might need to be tweaked on some Unix versions to be -perm -4000, which will produce the same basic results. That would look like this: for match in $(find /bin /usr/bin -type f -perm -4000 -print)Hope that helps clarify things!
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon
Categorized:
Shell Script Programming
(Article 3692)
Tagged: Previous: Another nice review of Wicked Cool Shell Scripts Next: Sneaky ls flags and bestcompress Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader. Hello Can you please tell me 1. How to monitor 'n' number of servers in solaris 10/9. 2. How to take bacukup of servers in solaris 10/9. Please kindly mail me also. Thanks in advance. Regards, I have a lot to say, but ...
I do have a comment, now that you mention it!
|
![]()
Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Join the List!
Book Links
|