Industry guru Dave Taylor offers free tech support on a wide variety of technical and business topics, including HTML, online advertising, Cascading Style Sheets, Web design, management, Unix, Linux, search engine optimization, online dating, Mac OS X, shell script programming and Microsoft Windows.

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.

Dave's Answer:

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    

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

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,
Mohammed Mujahid

Posted by: Mohammed Mujahid at April 2, 2007 1:59 PM


I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Uniblue: Free Virus Scan

Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Member of the B5Media Network

Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2009 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]