%% Dave Sherohman <[EMAIL PROTECTED]> writes:

  ds> On Mon, Jul 09, 2001 at 12:29:40PM -0400, Paul D. Smith wrote:

  >> >> BTW, the best way to do what you wanted to do is this:
  >> >> 
  >> >> $ chmod -R o-owx .[!.]*

  dc> Or even better, ignore the -R in the chmod command and use find:

  dc> find . -print0 | xargs -0 chmod r-owx

  >> Not to be argumentative, but what's better about it?

  ds> While I won't presume to judge which is better, there is a difference:

Certainly there's a difference; my second sentence was:

> First, your example doesn't do what the OP wanted to do, or what my
> example does do.

  ds> The chmod -R version will affect .foo/bar and ignore foo/.bar (it
  ds> looks only at names in the directory where the command is issued)

Yes, that was exactly the point of my second paragraph.

  ds> while the find version will leave .foo/bar alone and change
  ds> foo/.bar (it looks at each filename independently).

Not true at all; the find version will change _both_ .foo/bar _and_
foo/.bar.

"find ." matches everything in the current directory and below,
_including_ hidden files.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>    HASMAT--HA Software Methods & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.

Reply via email to