× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> How would I go about recursively changing the authority/owner for all
> objects in a IFS directory? Is there an IBM delivered program that would do
> this?

This is easy to do in QSHELL.   For example, to change everything in
directory called /some/dir to be owned by klemscot:

  STRQSH
  find /some/dir -exec chown klemscot {} \;

Or, maybe when one employee leaves and a new one starts you want to change
ownership from one person to another:

  find . -user mike -exec chown klemscot {} \;

(the . means it will work out of the current directory)

In fact, you can have any QSHELL command be executed after the "-exec"
keyword.  The {} is replaced with the name of the file when the command
is executed, and the \; tells the find command that it's reached the end
of the command string.

So, if you wanted to remove write access to everything in a directory,
you might do this:

  find /some/dir -exec chmod -w {} \;

Or, of course, only take write access away from files who are owned by
mike:

  find /some/dir -user mike -chmod -w {} \;

So, the find utility is great for working on directories recursively.
More info can be found in the information center:

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/find.htm

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.