Apache ANT Tasks Tutorial
Selected Reading
- 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
ANT Tasks - GUnzip
Apache Ant Tasks - GUnzip
Description
Gunzip task extracts an archive using GZip, BZip2 or XZ algorithm. Output file is generated only if it is not present or source resource is newer. If dest is omitted, the parent dir of src is used.
Properties
Sr.No | Attributes & Description |
---|---|
1 | src The file/collection to expand. (Mandatory) |
2 | Dest The destination file or directory. (Optional) |
Example
Usage
Create build.xml with the following content:
<?xml version="1.0"?> <project name="TutorialPoint" default="info"> <target name="info"> <gunzip src="text.gz" dest="text.txt"/> <echo>File extracted.</echo> </target> </project>
Output
Let s extract the a text.gz file to text.txt. Now running Ant on the above build file produces the following output −
F: utorialspointant>ant Buildfile: F: utorialspointantuild.xml info: [gunzip] Expanding text.gz to F: utorialspointant ext.txt [echo] File extracted. BUILD SUCCESSFUL Total time: 0 seconds
You can verify that the text.txt file is created.
Advertisements