Results 1 to 5 of 5
Thread: recursive chown
-
11-22-2002, 02:19 PM #1Junior Guru
- Join Date
- Jan 2001
- Location
- Netherlands
- Posts
- 236
recursive chown
I need to chown a bunch of .htaccess files, scattered about in a whole bunch of subdirectories. Rather then doing each one manually, is there a way to do the recursive thing on those .htaccess files? Oh, without changing ownership of the rest...
Hmm, what does this do... Oops!
-
11-22-2002, 02:28 PM #2Web Hosting Master
- Join Date
- Feb 2002
- Posts
- 985
chown -R dir
will chown dir and all subdirs and files under itPowered by AMD & FreeBSD.
"Documentation is like sex:
when it is good, it is very, very good;
and when it is bad, it is better than nothing."
-
11-22-2002, 02:33 PM #3Web Hosting Master
- Join Date
- Feb 2002
- Posts
- 985
sorry, ignore last message, do the following:
chown user.group `find .htaccess`Powered by AMD & FreeBSD.
"Documentation is like sex:
when it is good, it is very, very good;
and when it is bad, it is better than nothing."
-
11-22-2002, 02:50 PM #4Disabled
- Join Date
- Sep 2002
- Posts
- 243
Run the following command in the directory that you would like to chown .htaccess files in as well as for the .htaccess files in the subdirectories of your current location.
find . -name .htaccess -exec chown user.group {} \;
-
11-22-2002, 04:41 PM #5Junior Guru
- Join Date
- Jan 2001
- Location
- Netherlands
- Posts
- 236
hehe, a few seconds of typing and presto, all done...
Thanks very muchHmm, what does this do... Oops!