Results 1 to 5 of 5

Thread: recursive chown

  1. #1
    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!

  2. #2
    chown -R dir
    will chown dir and all subdirs and files under it
    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."

  3. #3
    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."

  4. #4
    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 {} \;

  5. #5
    Join Date
    Jan 2001
    Location
    Netherlands
    Posts
    236
    hehe, a few seconds of typing and presto, all done...

    Thanks very much
    Hmm, what does this do... Oops!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •