You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

chgrp.html 4.3 KiB

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