[Cialug] Need assistance with chown and find commands

Dave Weis djweis at sjdjweis.com
Thu Dec 19 14:01:05 CST 2013


Your way was dangerous because it didn't sanitize the arguments. I could create a filename of 
whatever ; rm -rf /
And clean your system or at least files you have permission to erase if not root.





-------- Original message --------
From: Tim McLaughlin <timothy.r.mclaughlin at gmail.com> 
Date:12/19/2013  1:22 PM  (GMT-06:00) 
To: Central Iowa Linux Users Group <cialug at cialug.org> 
Subject: Re: [Cialug] Need assistance with chown and find commands 

I was trying to give some options and for the specifics to be figured out.
no one learns anything with cut and paste, and its only fun if you are
learning something new.

--Tim



On Thu, Dec 19, 2013 at 1:12 PM, Paul Gray <gray at cs.uni.edu> wrote:

> On 12/19/2013 01:10 PM, Paul Gray wrote:
>
>  find . - -user userA -exec chown userB {} \;
>>
>          ^ Typo.  No extra dash
>
> find . -userA -exec chown userB {} \;
>
> -PG
>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug


More information about the Cialug mailing list