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.

chown.html 2.8 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Chown Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="Chown">Chown</a></h2>
  8. <h3>Description</h3>
  9. <p>Changes the owner of a file or all files inside specified
  10. directories. Right now it has effect only under Unix. The owner
  11. atribute is equivalent to the coresponding argument for the chown
  12. command.</p>
  13. <p><a href="../CoreTypes/fileset.html">FileSet</a>s can be specified
  14. using nested <code>&lt;fileset&gt;</code> elements.</p>
  15. <h3>Parameters</h3>
  16. <table border="1" cellpadding="2" cellspacing="0">
  17. <tr>
  18. <td valign="top"><b>Attribute</b></td>
  19. <td valign="top"><b>Description</b></td>
  20. <td align="center" valign="top"><b>Required</b></td>
  21. </tr>
  22. <tr>
  23. <td valign="top">file</td>
  24. <td valign="top">the file or directory of which the owner must be
  25. changed.</td>
  26. <td valign="top" valign="middle">Yes or nested
  27. <code>&lt;fileset&gt;</code> elements.</td>
  28. </tr>
  29. <tr>
  30. <td valign="top">owner</td>
  31. <td valign="top">the new owner.</td>
  32. <td valign="top" align="center">Yes</td>
  33. </tr>
  34. <tr>
  35. <td valign="top">parallel</td>
  36. <td valign="top">process all specified files using a single
  37. <code>chown</code> command. Defaults to true.</td>
  38. <td valign="top" align="center">No</td>
  39. </tr>
  40. <tr>
  41. <td valign="top">type</td>
  42. <td valign="top">One of <i>file</i>, <i>dir</i> or
  43. <i>both</i>. If set to <i>file</i>, only the owner of
  44. plain files are going to be changed. If set to <i>dir</i>, only
  45. the directories are considered.</td>
  46. <td align="center" valign="top">No, default is <i>file</i></td>
  47. </tr>
  48. </table>
  49. <h3>Examples</h3>
  50. <blockquote>
  51. <p><code>&lt;chown file=&quot;${dist}/start.sh&quot; owner=&quot;coderjoe&quot;/&gt;</code></p>
  52. </blockquote>
  53. <p>makes the &quot;start.sh&quot; file belong to coderjoe on a
  54. UNIX system.</p>
  55. <blockquote>
  56. <pre>
  57. &lt;chown owner=&quot;coderjoe&quot;&gt;
  58. &lt;fileset dir=&quot;${dist}/bin&quot; includes=&quot;**/*.sh&quot;/&gt;
  59. &lt;/chown&gt;
  60. </pre>
  61. </blockquote>
  62. <p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code>
  63. belong to coderjoe on a UNIX system.</p>
  64. <blockquote>
  65. <pre>
  66. &lt;chown owner=&quot;coderjoe&quot;&gt;
  67. &lt;fileset dir=&quot;shared/sources1&quot;&gt;
  68. &lt;exclude name=&quot;**/trial/**&quot;/&gt;
  69. &lt;/fileset&gt;
  70. &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
  71. &lt;/chown&gt;
  72. </pre>
  73. </blockquote>
  74. <p>makes all files below <code>shared/sources1</code> (except those
  75. below any directory named trial) belong to coderjoe on a UNIX
  76. system. In addition all files belonging to a FileSet
  77. with <code>id</code> <code>other.shared.sources</code> get the same
  78. owner.</p>
  79. <hr>
  80. <p align="center">Copyright &copy; 2002 Apache Software
  81. Foundation. All rights Reserved.</p>
  82. </body>
  83. </html>