source: release-kits/lirk3/bin/ant-installer/web/manual1.6.2/manual/OptionalTasks/chgrp.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 4.3 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Chgrp Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="Chgrp">Chgrp</a></h2>
12<p><em>Since Ant 1.6.</em></p>
13<h3>Description</h3>
14
15<p>Changes the group of a file or all files inside specified
16directories. Right now it has effect only under Unix. The group
17atribute is equivalent to the coresponding argument for the chgrp
18command.</p>
19
20<p><a href="../CoreTypes/fileset.html">FileSet</a>s,
21<a href="../CoreTypes/dirset.html">DirSet</a>s or <a
22href="../CoreTypes/filelist.html">FileList</a>s can be specified using
23nested <code>&lt;fileset&gt;</code>, <code>&lt;dirset&gt;</code> and
24<code>&lt;filelist&gt;</code> elements.</p>
25
26<h3>Parameters</h3>
27<table border="1" cellpadding="2" cellspacing="0">
28 <tr>
29 <td valign="top"><b>Attribute</b></td>
30 <td valign="top"><b>Description</b></td>
31 <td align="center" valign="top"><b>Required</b></td>
32 </tr>
33 <tr>
34 <td valign="top">file</td>
35 <td valign="top">the file or directory of which the group must be
36 changed.</td>
37 <td valign="top" valign="middle">Yes or nested
38 <code>&lt;fileset/list&gt;</code> elements.</td>
39 </tr>
40 <tr>
41 <td valign="top">group</td>
42 <td valign="top">the new group.</td>
43 <td valign="top" align="center">Yes</td>
44 </tr>
45 <tr>
46 <td valign="top">parallel</td>
47 <td valign="top">process all specified files using a single
48 <code>chgrp</code> command. Defaults to true.</td>
49 <td valign="top" align="center">No</td>
50 </tr>
51 <tr>
52 <td valign="top">type</td>
53 <td valign="top">One of <i>file</i>, <i>dir</i> or
54 <i>both</i>. If set to <i>file</i>, only the group of
55 plain files are going to be changed. If set to <i>dir</i>, only
56 the directories are considered.<br>
57 <strong>Note:</strong> The type attribute does not apply to
58 nested <i>dirset</i>s - <i>dirset</i>s always implicitly
59 assume type to be <i>dir</i>.</td>
60 <td align="center" valign="top">No, default is <i>file</i></td>
61 </tr>
62 <tr>
63 <td valign="top">maxparallel</td>
64 <td valign="top">Limit the amount of parallelism by passing at
65 most this many sourcefiles at once. Set it to &lt;= 0 for
66 unlimited. Defaults to unlimited.</td>
67 <td align="center" valign="top">No</td>
68
69 </tr>
70 <tr>
71 <td valign="top">verbose</td>
72 <td valign="top">Whether to print a summary after execution or not.
73 Defaults to <code>false</code>.</td>
74 <td align="center" valign="top">No</td>
75 </tr>
76
77</table>
78<h3>Examples</h3>
79<blockquote>
80 <p><code>&lt;chgrp file=&quot;${dist}/start.sh&quot; group=&quot;coders&quot;/&gt;</code></p>
81</blockquote>
82<p>makes the &quot;start.sh&quot; file belong to the coders group on a
83UNIX system.</p>
84<blockquote>
85<pre>
86&lt;chgrp group=&quot;coders&quot;&gt;
87 &lt;fileset dir=&quot;${dist}/bin&quot; includes=&quot;**/*.sh&quot;/&gt;
88&lt;/chgrp&gt;
89</pre>
90</blockquote>
91<p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code>
92belong to the coders group on a UNIX system.</p>
93<blockquote>
94<pre>
95&lt;chgrp group=&quot;coders&quot;&gt;
96 &lt;fileset dir=&quot;shared/sources1&quot;&gt;
97 &lt;exclude name=&quot;**/trial/**&quot;/&gt;
98 &lt;/fileset&gt;
99 &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
100&lt;/chgrp&gt;
101</pre>
102</blockquote>
103<p>makes all files below <code>shared/sources1</code> (except those
104below any directory named trial) belong to the coders group on a UNIX
105system. In addition all files belonging to a FileSet
106with <code>id</code> <code>other.shared.sources</code> get the same
107group.</p>
108
109<blockquote>
110<pre>
111&lt;chgrp group=&quot;webdev&quot; type=&quot;file&quot;&gt;
112 &lt;fileset dir=&quot;/web&quot;&gt;
113 &lt;include name=&quot;**/*.test.jsp&quot;/&gt;
114 &lt;include name=&quot;**/*.new&quot;/&gt;
115 &lt;/fileset&gt;
116 &lt;dirset dir=&quot;/web&quot;&gt;
117 &lt;include name=&quot;**/test_*&quot;/&gt;
118 &lt;/dirset&gt;
119&lt;/chmod&gt;
120</pre>
121</blockquote>
122
123<p>makes all <code>.test.jsp</code>, and <code>.new</code> files belong to
124group webdev. Directories begining with <code>test_</code> also will belong
125to webdev, but if there is a directory that ends in <code>.new</code> or a file
126that begins with <code>test_</code> it will be unaffected.</p>
127
128
129<hr>
130<p align="center">Copyright &copy; 2002-2004 The Apache Software
131Foundation. All rights Reserved.</p>
132
133</body>
134</html>
135
Note: See TracBrowser for help on using the repository browser.