• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

Pack directory into a compressed tar file

Hi, experts,

I need to take all files in a directory and combine them into tar files of a given size, such as 2 Gigs each. Apache ANT has the necessary classes, but there are subtleties, and I am looking for some sample code to do this.

Thank you.
0
kerzner
Asked:
kerzner
  • 3
  • 3
1 Solution
 
objectsCommented:
0
 
kerznerAuthor Commented:
I would expect ANT tar to work better, simply because it is under constant development - and beside ICE does not have any examples either.
0
 
objectsCommented:
i may have misunderstood. doo u want to do it with ant, or call the ant class from your own java app

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
kerznerAuthor Commented:
I want to call any class from my application. Actually, I could use zip; it doesn't have to be tar - but there seem to be some advantages to using tar. For example, it will probably allow to do this trick: store the path and no contents for those files that I decide not to archive.
0
 
objectsCommented:
theres an example of zipping here
http://helpdesk.objects.com.au/java/how-to-create-a-zip-file-containing-an-array-of-files

you could also jar (pretty much same as zip)


0
 
kerznerAuthor Commented:
Thank you
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now