- Ant Tasks - Discussion
- Ant Tasks - Useful Resources
- Ant Tasks - Quick Guide
- ANT Tasks -JAR
- ANT Tasks - Zip
- ANT Tasks - WAR
- ANT Tasks - Sleep
- ANT Tasks - Move
- ANT Tasks - MkDir
- ANT Tasks - LoadFile
- ANT Tasks - Length
- ANT Tasks - Javac
- ANT Tasks - Java
- ANT Tasks - Import
- ANT Tasks - Fail
- ANT Tasks - EAR
- ANT Tasks - Delete
- ANT Tasks - Copy
- ANT Tasks - Condition
- ANT Tasks - Concat
- ANT Tasks - Chmod
- ANT Tasks - GUnzip
- ANT Tasks - GZip
- ANT Tasks - BaseName
- ANT Tasks - Environment Setup
- ANT Tasks - Introduction
- ANT Tasks - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Apache Ant Tasks - Chmod
Description
Chmod task works on Unix and works similar to chmod command. It changes the permissions of a file or all files inside specified directories.
Properties
Sr.No | Attributes & Description |
---|---|
1 | File The file or single directory of which the permissions must be changed. (Mandatory) |
2 | Dir The directory which holds the files whose permissions must be changed. (Mandatory) |
3 | Perm The new permissions. (Mandatory) |
4 | Includes comma- or space-separated pst of patterns of files that must be included. (Optional) |
5 | Excludes comma- or space-separated pst of patterns of files that must be excluded. (Optional) |
6 | Defaultexcludes indicates whether default excludes should be used or not (yes|no). (Optional). Default is yes. |
7 | Parallel process all specified files using a single chmod command. (Optional). Default is true. |
8 | Type One of file, dir or both. If set to file, only the permissions of plain files are going to be changed. If set to dir, only the directories are considered. (Optional). Default is file. |
9 | Maxparallel Limit the amount of parallepsm by passing at most this many sourcefiles at once. Set it to negative integer for unpmited. (Optional). Default is infinite. |
10 | Verbose Whether to print a summary after execution or not. (Optional). Default is false. |
11 | OS pst of Operating Systems on which the command may be executed. (Optional) |
12 | Osfamily OS family as used. (Optional).Default is Unix. |
Example
Usage
Create build.xml with the following content −
<?xml version="1.0"?> <project name="TutorialPoint" default="info"> <target name="info"> <chmod file="start.sh" perm="ugo+rx"/> </target> </project>
Above script makes start.sh as readable and executable on a Unix machine.
Advertisements