[Chicago-talk] chown inside a script

Brian Katzung briank at kappacs.com
Wed Dec 5 18:42:07 PST 2007



Jonathan Rockway wrote:
> On Wed, 2007-12-05 at 15:58 -0600, Andy Lester wrote:
>> system( 'chown', 'whoever', glob( '/home/blah/blah/whatever*' ) );
> 
> BTW, chown is a builtin function:
> 
>   chown $uid, $gid, </path/to/files/*>
> 
> Regards,
> Jonathan Rockway

Putting it all together (except for error checking :-),

chown scalar(getpwnam "jblum"), -1, 
glob("/opt/montrose/private/active/PROSPECT/07120415*");

Programming by committee. We should qualify for government work. :-)

   - Brian

-- 
Brian Katzung, Kappa Computer Solutions, LLC
Leveraging UNIX, GNU/Linux, open source, and custom
software solutions for business and beyond
Phone: 877.367.8837 x1  http://www.kappacs.com



More information about the Chicago-talk mailing list