I want to compress a folder in julia:
tar -cvf - "source" | pigz -k -9 > "source.tar.xz"
where source
is a folder
I tried this in julia:
run(pipeline(`tar -cvf - "2001_ A Space Odyssey"` , `pigz -k -9 \> "2001_ A Space Odyssey.tar.xz"`))
but it didn’t work. I got error below:
pigz: skipping: > does not exist
pigz: skipping: 2001_ A Space Odyssey.tar.xz does not exist
2001_ A Space Odyssey/
2001_ A Space Odyssey/cover.jpg
ERROR: LoadError: failed process: Process(`pigz -k -9 '>' '2001_ A Space Odyssey.tar.xz'`, ProcessExited(1)) [1]
How can I do it in julia?