[X-Unix] need help with a command

Albert Lunde atlunde at panix.com
Tue Mar 1 16:44:54 PST 2005


On Tue, Mar 01, 2005 at 12:43:45PM -1000, Scott J. Kramer wrote:
> Assuming that's really a directory starting with a tilde '~' character
> and not user ARCHIVE's home directory, something like:
> 
>  find PATH -not \( -type d -a -name '~Archive' \) -exec chmod MODE {} \;
> 

Wouldn't it be safer to write
  -exec foo bar {} \;
as
  -exec foo bar "{}" \;

I'm not sure that will deal with arbitrary characters but it ought
to at least deal with spaces in pathnames.





More information about the X-Unix mailing list