need eff. "find" query

From: jnaneshkalbag (jnaneshkalbag@indiatimes.com)
Date: Sat Apr 26 2003 - 13:52:59 EDT


Hi,

Can any one help on how to generate this find query.

Problem Description:
I have the following "test" directory tree setup.
test:
     usr1/
     usr2/
     ...
     ...
     usr*/
At application runtime, these "usr*" directories under "test" are created.Also under each "usr*" directory, many subdirectories and files are created at runtime.All these "usr*/*" are created using "mkdir -p" option.All subdirectories/files under "test" are created with 777 permissions.

I need to build a find command as a prt of a script which will access each and every file and dir. in "test" setup and change permissions to 744.

I tried the following find command as a part of test script and here are the results:

find . -name "*test/usr*" -exec chmod -R 744 '{}' \;

Result: it gives an error saying cannot access usr*
even though there are 777 permissions to whole "test" directory structure.This does not seem to be a ownership though as I am in root mode and the "test" setup was done in root mode.

I would appreciate if anyone can share their views on building an effective find query to get the results.

thanks in advance,
Jnanesh

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://airsahara.indiatimes.com and Bid Now!
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:17 EDT