|
The easy way, using QSHELL is to do a recursive "chown" or "chmod". For example, to change the owner of any file in my home directory to be "klemscot", I'd do: cd /home/klemscot chown -R klemscot * Or to change them to be readable/writable to the owner, readable to people in his group, and not readable to the public, I'd do: cd /home/klemscot chmod -R 640 * A more flexible method is to use the "find" command under QSHELL. Find will do a search of all files rooted in a directory, and you can execute any command on them that you wish. For example, if you wanted to change the owner of all files in my home directory, and it's children, to klemscot, you'd do: find /home/klemscot -exec chown klemscot {} \; Everything between the "-exec" and the "\;" makes up a command string that find will execute for each filename it finds. The '{}' will be replaced by find with the file name, each time it calls the executed command (in this example, "chown") So, if I only wanted to change HTML files rooted in my home directory to be owner *RW, group *R, and public *NONE, I might do: find /home/klemscot -name '*.html' -exec chmod 640 {} \; And, of course, you could use this to run your own program for each file, if you wanted, like so: find /some/dir -name '*.foo' -exec mypgm {} \; I could go on with more examples all day, but I've probably already given too much information :) On Fri, 7 Dec 2001, Chris Bipes wrote: > Is there an easy way to change authority on all subdirectories and files > within? CHGAUT only works on the current level and does not do > subdirectories. How would I change authority using qshell? I have set the > parent directory and the two sub directories under it. One of the sub > directories has hundreds of directories and each one may have several > directories under them. OpsNav is a joke! I am on a 720 at 4.4 >
As an Amazon Associate we earn from qualifying purchases.
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.