tar

pipe/stream gnupg output to tarfile in

限于喜欢 提交于 2021-02-05 09:37:32
问题 I have the following code but obviously this is not real streaming. It is the best I could find but it reads the whole input file into memory first. I want to stream it to tarfile module without using all my memory when decrypting huge (>100Gb files) import tarfile, gnupg gpg = gnupg.GPG(gnupghome='C:/Users/niels/.gnupg') with open('103330-013.tar.gpg', 'r') as input_file: decrypted_data = gpg.decrypt(input_file.read(), passphrase='aaa') # decrypted_data.data contains the data decrypted

Stream multiple files at once from a Django server

你。 提交于 2021-01-29 06:12:00
问题 I'm running a Django server to serve files from another server in a protected network. When a user makes a request to access multiple files at once I'd like my Django server to stream these files all at once to that user. As downloading multiple files at once is not easily possible in a browser the files need to be bundled somehow. I don't want my server having to download all files first and then serve a ready bundled file, because that adds a lot of timeloss for larger files. With zips my

AWS lambda tar file extraction doesn't seem to work

本秂侑毒 提交于 2021-01-28 11:27:38
问题 I'm trying to run serverless LibreOffice based on this tutorial. Here is the full python lambda function: import boto3 import os s3_bucket = boto3.resource("s3").Bucket("lambda-libreoffice-demo") os.system("curl https://s3.amazonaws.com/lambda-libreoffice-demo/lo.tar.gz -o /tmp/lo.tar.gz && cd /tmp && tar -xf /tmp/lo.tar.gz") convertCommand = "instdir/program/soffice --headless --invisible --nodefault --nofirststartwizard --nolockcheck --nologo --norestore --convert-to pdf --outdir /tmp" def

Encoding of filenames containing non-latin characters while extracting from .tar.gz packed by Ant tar task

守給你的承諾、 提交于 2021-01-28 01:22:38
问题 I'm building a tar.gz archive using Ant: <tar destfile="${linux86.zip.file}" compression="gzip" longfile="gnu"> <tarfileset dir="${work.dir}/data" dirmode="755" filemode="755" prefix="${app.folder}/data"/> </tar> Archive is built on Windows. After being extracted on Ubuntu 12 files with names containing non-latin (for example, cyrillic) characters have broken names. Is there any way to fix or work around that? 回答1: No. Tar archives support only ascii filenames. See this question: Creating tar

Untar / Unzip *.tar.xz with ANT

本秂侑毒 提交于 2021-01-27 07:23:34
问题 I want to extract a tarball-file with *.tar.xz with ant. But I can only find, bunzip2, gunzip, unzip and untar as goals in ant and none of it seems to work. So how can I expand a tarball-file with *.tar.xz with ant? 回答1: The XZ format is not supported by the default Ant distribution, you'll need the Apache Compress Antlib. Download the full Antlib with all the dependencies from here (add the three jars ant-compress , common-compress , xz in the lib directory of your ant), and use this task:

Untar / Unzip *.tar.xz with ANT

一世执手 提交于 2021-01-27 07:23:12
问题 I want to extract a tarball-file with *.tar.xz with ant. But I can only find, bunzip2, gunzip, unzip and untar as goals in ant and none of it seems to work. So how can I expand a tarball-file with *.tar.xz with ant? 回答1: The XZ format is not supported by the default Ant distribution, you'll need the Apache Compress Antlib. Download the full Antlib with all the dependencies from here (add the three jars ant-compress , common-compress , xz in the lib directory of your ant), and use this task:

Untar / Unzip *.tar.xz with ANT

我只是一个虾纸丫 提交于 2021-01-27 07:21:09
问题 I want to extract a tarball-file with *.tar.xz with ant. But I can only find, bunzip2, gunzip, unzip and untar as goals in ant and none of it seems to work. So how can I expand a tarball-file with *.tar.xz with ant? 回答1: The XZ format is not supported by the default Ant distribution, you'll need the Apache Compress Antlib. Download the full Antlib with all the dependencies from here (add the three jars ant-compress , common-compress , xz in the lib directory of your ant), and use this task:

Extract a specific folder to specific directory from a tar.gz

半腔热情 提交于 2021-01-20 19:37:28
问题 I have searched and found how to the two portions of what I want but nothing that would allow you to do it in whole.... What I would like to do is extract a specific folder from a tar.gz to another folder in a different path that how it is in the tar.gz. For example: Directory path in my backup.tar.gz file is: a/b/c/d (d is my main with many others inside) I want to unpack directory 'd' into 'm' inside this different server path: a/b/m If I attempt this code: tar -xzf backup.tar.gz -C a/b/m *