How to unpack a .tar file in Julia?

690 views
Skip to first unread message

Weijian Zhang

unread,
Mar 10, 2015, 4:05:38 PM3/10/15
to julia...@googlegroups.com
Hello,

I have a .tar.gz file. With GZip.jl, I can write code to unzip it to a .tar file.
But how can I unpack this .tar file in Julia?

Thanks,

Weijian

Stefan Karpinski

unread,
Mar 10, 2015, 4:33:06 PM3/10/15
to Julia Users
I would just shell out to the tar command and then work with the untarred directory.

Weijian Zhang

unread,
Mar 11, 2015, 2:37:17 PM3/11/15
to julia...@googlegroups.com
All right, thanks.

Aslak Grinsted

unread,
Feb 1, 2016, 7:34:13 AM2/1/16
to julia-users

I have a problem that i do not have tar on my windows machine, and for that reason Pkg.build("GR") fails. I tried fixing it using 7zip as that was present in my julia bin folder by replacing 

run(`tar xzf downloads/$tarball`)

with 

run(pipeline(`7z x -so downloads/$tarball`,`7z x -aoa -si -ttar -o"."`))

--- That worked fine on my windows machine, but fails on travis: https://travis-ci.org/jheinen/GR.jl/jobs/106192456

Any tips are welcome. 

Tony Kelman

unread,
Feb 1, 2016, 6:34:45 PM2/1/16
to julia-users
Check the BinDeps package for unpack_cmd

Josef Heinen

unread,
Feb 2, 2016, 7:31:01 AM2/2/16
to julia-users
Thanks for the info.

The problem is solved (in the meantime). See GR.jl commit 889f9d0
Reply all
Reply to author
Forward
0 new messages