[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NO! chmod strikes! -- oops




hiya marin

> > if you only wanted to change the local dot files... oh well...
> > we all learn and remember the hard way... :-)
> > 	shoulda been:  chmod pattern  ~/.*
> 
> NO. ~/.* includes .. ~/.. too, if expanded by the shell. In this case this
> would be /root/.. which is nothing els but / ... the same mess again :-)

yes...

there's few ways to do it...

problem with that find below is it pick up .elm, .ssh, .netscape
directories too 

so the find has to be told files only ( -type f )
which means the  "-not" options should not be needed

find ~ -name ".*" -type f -exec ls -la {}\;   -or-
find ~ -name ".*" -type f -ls

if that works... ( picks out what you want ... ) than...

find ~ -name ".*" -type f -exec chmod pattern {}\;


might(will) be easier to explicitly specify the list of files you 
want directly to chmod since you could have dozens of various dot files
and dot dirs

have fun
alvin
 
>    find -name ".*" -not -name ".." -not -name "." -maxdepth 1 
> 
> is one way to get all dot-files and dot dirs in the same dir, this piped
> through a 
> 
>    xargs chmod -R o-rwx
> 
> will do what the "chmod -R o-rwx .*" was supposed to do in the original
> post...
> 
> Martin
> 



Reply to: