Re: find and chmod

From: Faeandar (mr_castalot_at_yahoo.com)
Date: 04/20/04


Date: Tue, 20 Apr 2004 20:43:22 GMT

On Tue, 20 Apr 2004 19:14:28 GMT, Faeandar <mr_castalot@yahoo.com>
wrote:

>I'm running the following on an nfs file system housed on a NetApp:
>
>sudo find . -type d -name .snapshot -prune -exec chmod g+s \{}
>
>I want to set the sgid bit for all directories from here down. It's
>deep so I don't want to do it by manually but this doesn't seem to
>work, whereas setting it individually does.
>
>Thanks.
>
>~F

Nevermind, found my problem. The command should actually look like:

sudo find . -type d -name .snapshot -prune -o -type d -exec chmod g+s
{} \;

This looks to be working a little better. The "\{}" was actually a
typo. I really was doing "{} \;".

I think the problem was the -o option.

~F



Relevant Pages

  • Re: The newgrp command
    ... experienced user of Linux. ... Good point from your msg on SGID. ... When I as a user used newgrp to switch myself to a new ... I also agree that, this command is ...
    (Fedora)
  • Re: Poll - How do you read RGP.. Google or News Server?
    ... I read r.g.p on a Unix system using readers invoked at the command line. ... I can go as far back, or as deep in a thread, as the stored articles ... I may not recall exactly what was in the "immediately" preceding post. ...
    (rec.games.pinball)
  • Re: 10,000 Search Problem in W2K
    ... Makes things slower. ... You want to keep OU's to around 5 deep if you ... As Joe says, command line is much faster. ...
    (microsoft.public.windows.server.active_directory)
  • Re: CommandBar Resize
    ... the shape defaults to 1 button deep by 3 ... If you set the Width property of your command bar to the width of one ... * Take your Excel development skills to the next level. ...
    (microsoft.public.excel.programming)
  • Re: File::Find again
    ... I can see why people hate this module but I can't seem to let go. ... I point this script at a deep dir structure that has java .properties ... the variable $searchstring at the command line. ...
    (perl.beginners)

Loading