- Apache ANT Tasks Tutorial
- ANT Tasks - Home
- ANT Tasks - Introduction
- ANT Tasks - Environment Setup
- Apache ANT Tasks Examples
- ANT Tasks - BaseName
- ANT Tasks - GZip
- ANT Tasks - GUnzip
- ANT Tasks - Chmod
- ANT Tasks - Concat
- ANT Tasks - Condition
- ANT Tasks - Copy
- ANT Tasks - Delete
- ANT Tasks - EAR
- ANT Tasks - Fail
- ANT Tasks - Import
- ANT Tasks - Java
- ANT Tasks - Javac
- ANT Tasks - Length
- ANT Tasks - LoadFile
- ANT Tasks - MkDir
- ANT Tasks - Move
- ANT Tasks - Sleep
- ANT Tasks - WAR
- ANT Tasks - Zip
- ANT Tasks -JAR
- Apache ANT Tasks Useful Resources
- Ant Tasks - Quick Guide
- Ant Tasks - Useful Resources
- Ant Tasks - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Apache Ant Tasks - Chmod
Chmod task works on Unix and works similar to chmod command. It changes the permissions of a file or all files inside specified directories.
|Sr.No||Attributes & Description|
The file or single directory of which the permissions must be changed. (Mandatory)
The directory which holds the files whose permissions must be changed. (Mandatory)
The new permissions. (Mandatory)
comma- or space-separated list of patterns of files that must be included. (Optional)
comma- or space-separated list of patterns of files that must be excluded. (Optional)
indicates whether default excludes should be used or not (yes|no). (Optional). Default is yes.
process all specified files using a single chmod command. (Optional). Default is true.
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.
Limit the amount of parallelism by passing at most this many sourcefiles at once. Set it to negative integer for unlimited. (Optional). Default is infinite.
Whether to print a summary after execution or not. (Optional). Default is false.
list of Operating Systems on which the command may be executed. (Optional)
OS family as used. (Optional).Default is Unix.
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.