2002-11-07 15:59:47 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
|
|
<title>Chgrp Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h2><a name="Chgrp">Chgrp</a></h2>
|
2003-05-21 08:55:35 +00:00
|
|
|
<p><em>Since Ant 1.6.</em></p>
|
2002-11-07 15:59:47 +00:00
|
|
|
<h3>Description</h3>
|
|
|
|
|
|
|
|
<p>Changes the group of a file or all files inside specified
|
|
|
|
directories. Right now it has effect only under Unix. The group
|
2004-04-08 17:19:40 +00:00
|
|
|
attribute is equivalent to the corresponding argument for the chgrp
|
2002-11-07 15:59:47 +00:00
|
|
|
command.</p>
|
|
|
|
|
2003-06-24 09:16:10 +00:00
|
|
|
<p><a href="../CoreTypes/fileset.html">FileSet</a>s,
|
|
|
|
<a href="../CoreTypes/dirset.html">DirSet</a>s or <a
|
2003-05-21 08:55:35 +00:00
|
|
|
href="../CoreTypes/filelist.html">FileList</a>s can be specified using
|
2003-06-24 09:16:10 +00:00
|
|
|
nested <code><fileset></code>, <code><dirset></code> and
|
|
|
|
<code><filelist></code> elements.</p>
|
2002-11-07 15:59:47 +00:00
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td valign="top"><b>Attribute</b></td>
|
|
|
|
<td valign="top"><b>Description</b></td>
|
|
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">file</td>
|
2002-11-08 08:32:13 +00:00
|
|
|
<td valign="top">the file or directory of which the group must be
|
|
|
|
changed.</td>
|
2004-04-08 17:19:40 +00:00
|
|
|
<td valign="top" valign="middle">Yes, unless nested
|
|
|
|
<code><fileset|filelist|dirset></code>
|
|
|
|
elements are specified</td>
|
2002-11-07 15:59:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">group</td>
|
|
|
|
<td valign="top">the new group.</td>
|
|
|
|
<td valign="top" align="center">Yes</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">parallel</td>
|
|
|
|
<td valign="top">process all specified files using a single
|
|
|
|
<code>chgrp</code> command. Defaults to true.</td>
|
|
|
|
<td valign="top" align="center">No</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">type</td>
|
|
|
|
<td valign="top">One of <i>file</i>, <i>dir</i> or
|
|
|
|
<i>both</i>. If set to <i>file</i>, only the group of
|
|
|
|
plain files are going to be changed. If set to <i>dir</i>, only
|
2003-06-24 09:16:10 +00:00
|
|
|
the directories are considered.<br>
|
|
|
|
<strong>Note:</strong> The type attribute does not apply to
|
|
|
|
nested <i>dirset</i>s - <i>dirset</i>s always implicitly
|
|
|
|
assume type to be <i>dir</i>.</td>
|
2002-11-07 15:59:47 +00:00
|
|
|
<td align="center" valign="top">No, default is <i>file</i></td>
|
|
|
|
</tr>
|
2003-05-21 08:55:35 +00:00
|
|
|
<tr>
|
|
|
|
<td valign="top">maxparallel</td>
|
|
|
|
<td valign="top">Limit the amount of parallelism by passing at
|
|
|
|
most this many sourcefiles at once. Set it to <= 0 for
|
|
|
|
unlimited. Defaults to unlimited.</td>
|
|
|
|
<td align="center" valign="top">No</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">verbose</td>
|
|
|
|
<td valign="top">Whether to print a summary after execution or not.
|
|
|
|
Defaults to <code>false</code>.</td>
|
|
|
|
<td align="center" valign="top">No</td>
|
|
|
|
</tr>
|
|
|
|
|
2002-11-07 15:59:47 +00:00
|
|
|
</table>
|
|
|
|
<h3>Examples</h3>
|
|
|
|
<blockquote>
|
|
|
|
<p><code><chgrp file="${dist}/start.sh" group="coders"/></code></p>
|
|
|
|
</blockquote>
|
|
|
|
<p>makes the "start.sh" file belong to the coders group on a
|
|
|
|
UNIX system.</p>
|
|
|
|
<blockquote>
|
|
|
|
<pre>
|
2003-06-24 09:16:10 +00:00
|
|
|
<chgrp group="coders">
|
|
|
|
<fileset dir="${dist}/bin" includes="**/*.sh"/>
|
|
|
|
</chgrp>
|
2002-11-07 15:59:47 +00:00
|
|
|
</pre>
|
|
|
|
</blockquote>
|
|
|
|
<p>makes all ".sh" files below <code>${dist}/bin</code>
|
|
|
|
belong to the coders group on a UNIX system.</p>
|
|
|
|
<blockquote>
|
|
|
|
<pre>
|
|
|
|
<chgrp group="coders">
|
|
|
|
<fileset dir="shared/sources1">
|
|
|
|
<exclude name="**/trial/**"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset refid="other.shared.sources"/>
|
|
|
|
</chgrp>
|
|
|
|
</pre>
|
|
|
|
</blockquote>
|
|
|
|
<p>makes all files below <code>shared/sources1</code> (except those
|
|
|
|
below any directory named trial) belong to the coders group on a UNIX
|
|
|
|
system. In addition all files belonging to a FileSet
|
|
|
|
with <code>id</code> <code>other.shared.sources</code> get the same
|
|
|
|
group.</p>
|
|
|
|
|
2003-06-24 09:16:10 +00:00
|
|
|
<blockquote>
|
|
|
|
<pre>
|
|
|
|
<chgrp group="webdev" type="file">
|
|
|
|
<fileset dir="/web">
|
|
|
|
<include name="**/*.test.jsp"/>
|
|
|
|
<include name="**/*.new"/>
|
|
|
|
</fileset>
|
|
|
|
<dirset dir="/web">
|
|
|
|
<include name="**/test_*"/>
|
|
|
|
</dirset>
|
|
|
|
</chmod>
|
|
|
|
</pre>
|
|
|
|
</blockquote>
|
|
|
|
|
|
|
|
<p>makes all <code>.test.jsp</code>, and <code>.new</code> files belong to
|
|
|
|
group webdev. Directories begining with <code>test_</code> also will belong
|
|
|
|
to webdev, but if there is a directory that ends in <code>.new</code> or a file
|
|
|
|
that begins with <code>test_</code> it will be unaffected.</p>
|
|
|
|
|
|
|
|
|
2002-11-07 15:59:47 +00:00
|
|
|
<hr>
|
2004-04-13 07:15:53 +00:00
|
|
|
<p align="center">Copyright © 2002-2004 Apache Software
|
2002-11-07 15:59:47 +00:00
|
|
|
Foundation. All rights Reserved.</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|