Questions tagged [tar]

1

votes
0

answer
24

Views

`tar x` command is recreating original filepath of file with mkdir -p

I connect to a TCP server and receive .tar files like so: nc localhost 5000 | tar x I have also tried: nc localhost 5000 | tar x -C . the problem is that these commands aren't writing the .tar files to the current directory, they are actually recreating the entire filepath, such that if the original...
1

votes
1

answer
111

Views

How to know if a file is being compressed

From a set of files, I'm creating a tar file and, from the tar file, a tar.gz file (using python). The creation of the compressed file could take time, so: I'd like to know if there is a way to know that the 'process to create a compressed file' is 'on-going'. Maybe checking by some temp file or sim...
Lobo
1

votes
1

answer
154

Views

Sending and receiving tarfile via MQTT - python

I'm able to send a tarball via MQTT using a python script, but when I receive it, I go to unzip it and receive an error. After tracking down the error, it appears as if the input stream is not tar-ing up the file, so even though the extension is .tar.gz, it is not an actual .tar.gz file. It sounds r...
SomeGuy
1

votes
1

answer
101

Views

File transfer with Tar piped through SSH using python

I would like to run into python a command such as : tar -cf - files | ssh -c arcfour128 [email protected] 'tar -xf - -C /directory/' I could obviously use subprocess.run : subprocess.run('''tar -cf - %s | ssh -c arcfour128 [email protected] 'tar -xf - -C /directory/' ''' % file_list ,shell=True)) However such...
1

votes
1

answer
287

Views

Python tar a directory and symmetric encrypt with gpg

At this point the script works great for a single file. When a directory is given it uses tar to create a singe file which works well, then the tar file is gpg encrypted with a password provided. The gpg works also. The problem is that when you decrypt the gpg file the tar is corrupted every time. I...
Troy Wilson
1

votes
0

answer
322

Views

nodejs convert stream to json object

I have a tar stream and would like to convert it to JSON, i'm using JSONstream package, it is convenient and easy however while dealing with large data volumes the heap memory seems to be grow continuously and slows down the whole process. Any simple and memory sensitive way to convert stream to JSO...
Sai
1

votes
0

answer
100

Views

How to get the folder name in InMemoryUploadedFile in django?

In the django project I was working on, the uploaded tar file is stored as an InMemoryUploadedFile. I want to know the name of folder obtained by extracting that tar file. How can I do that? For example, a folder named 'abcd' is created and it is compressed. We get 'abcd.tar.gz'. Now it's name is ch...
Light
1

votes
0

answer
38

Views

tar compressing and decompressing

I am working on iMX6 Arm processor based hardware platform with embedded linux. I am using the tar command to compress a directory containing 3 files. When I try to decompress the folder to get back the three files I am facing different issues: I get one or two files after decompressing. The data...
1

votes
0

answer
207

Views

Comparing two tar.gz

I have two tar.gz files I have downloaded from the same URL. One I downloaded using Safari (53.6 MB) and the other one through Chrome (56.9 MB). Extracting them results in two exactly alike folders with 56 MB. Same sizes, same contents. I compared with diff and found no difference. I also compared b...
Socrates
1

votes
1

answer
41

Views

build image from tarball

I create a tar archive from within my working dir tar -chv . --exclude='build/tarball.tar' > build/tarball.tar and would like to create an image from this sudo docker build - < build/tarball.tar This is my dockerfile FROM node:8.11.3-slim RUN apt-get update && apt-get install -y ENV GOSU_VERSION 1.1...
1

votes
0

answer
29

Views

Unable to read a .any file within a tar file using apache-vfs-2.2

I am trying to read the contents of a .any file which is compressed in a tar file, using groovy script. It is using apache-vfs-2.2 Eg : /path/to/abcd.tar!/path/to/xyz.any The error notified: org.apache.commons.vfs2.FileSystemException: Could not read from 'tar:file:///path/to/abcd.tar!/path/to/xyz.a...
swathy durga
1

votes
2

answer
247

Views

Downloading a large file from colab fails

I'm trying to download a directory which I've compressed as a .tar file, using the code below. The .tar file seems to have downloaded but is much smaller than it is shown on colab. Also I get the error message below. Can someone please let me know what the error message below means and is there a...
user3476463
1

votes
0

answer
843

Views

tar: /: file changed as we read it. Does this mean that tar skipped one or more files?

I am running Ubuntu 16.0.4 LTS and I'm compressing a directory that contains 32Gb of (CSV) files, so that I can remove the 800k+ files in my directory and create some space.. I run the following command tar czxvf /path/to/archive.tar.gz /path/to/source/directory The last line before the command prom...
1

votes
0

answer
32

Views

Best setting to create a tarball faster

My goal is to create a dummy.tar file containing all my files&dirs in a dummy directory, which sums up to several TB of information. Moreover, I want this to go as fast as possible. I created the following setting in AWS for this purpose: c5.xlarge (4 cores and 8GB ram) one hdd containing the menti...
João Matos
1

votes
0

answer
22

Views

tar directory contains ._ files

I extracted files from a tar directory and noticed that on my mac for each file there was also another file named ._. I did the standard procedure with: import tarfile with tarfile.open('file.tar.gz', 'r:gz') as tar: tar.extractall() The files contain something like: Mac OS X 2PATTRP�...
blckbird
1

votes
1

answer
26

Views

TarWriter throws Gem::Package::TarWriter::FileOverflow

I want to generate a tar from a buch of files. out_file = File.new('some.tar', 'w') tar = Gem::Package::TarWriter.new out_file attachments = #Array of attachment objects attachments.each{|a| file = Attachment.new(a).read_file #returns a String file.force_encoding('UTF-8') tar.add_file_simple( a[:fil...
Chris Cross
1

votes
0

answer
69

Views

tar utime from docker-on-windows does not work

I am trying to do some builds from docker (yocto specifically), and I would like to be able to run it and have the output be in the Windows filesystem. However, no matter I do, utime does not work from the docker container. (Note that all is fine if I change the output directories to be inside the d...
Ben
1

votes
1

answer
27

Views

Name of the file decompressed after using tar

Basically new to bash and what I want to do is to decompress a file and shortly after obtain all of the files inside this new decompressed file to loop through them. As I am new to bash I am kind of struggline a little bit and the fastest way I found to do it is hardcoding the name of the compressed...
DDDDEEEEXXXX
1

votes
0

answer
87

Views

how to uncompress .tar and lz4 file in qt?

i make a application in Qt for extract zip , tar and lz4 files, So i use QuaZip and zlib library! The step one (Qt cmd): cd C:\Qt\zlib-1.2.8 mingw32-make -f win32/Makefile.gcc and step two: cd C:\Qt\quazip-0.7 qmake 'CONFIG+=release' 'INCLUDEPATH+=C:/Qt/zlib-1.2.8' 'LIBS+=-LC:/Qt/zlib- 1.2.8 -lz' m...
jocker fantom
1

votes
0

answer
27

Views

Tar --compare over an ssh connection

I have a lot of image data on a remote server that I need to copy over to a local drive. The local drive writes data off to tape after 30days, and so it is important that the data is kept together in convenient chunks otherwise it can end up on multiple tapes and take several days to retrieve. To do...
Michelle Croughan
1

votes
5

answer
1.1k

Views

What are these stray zero-byte files extracted from tarball? (OSX)

I'm extracting a folder from a tarball, and I see these zero-byte files showing up in the result (where they are not in the source.) Setup (all on OS X): On machine one, I have a directory /My/Stuff/Goes/Here/ containing several hundred files. I build it like this tar -cZf mystuff.tgz /My/Stuff/Goe...
1

votes
2

answer
2.3k

Views

How to resolve AIX tar command sockets errors?

Working in an AIX environment, I'm issuing the following tar command and receive errors on sockets. Question 1. How can I avoid the socket errors? Question 2. Can I rely on the tar file to contain all files excluding the ones in error? $ tar -cvf /post_patches.tar /xyz tar: /xyz/runtime/splSock6...
1

votes
1

answer
287

Views

Access a large file in a zip archive with HTML in a python-webkit WebView without extracting

I apologize for any confusion from the question title. It's kind of a complex situation with components that are new to me so I'm unsure of how to describe it succinctly. I have some xml data and an image in an archive (zip in this case, but could easily be tar or tar.gz) and using python, gtk, and...
Erik Youngren
1

votes
2

answer
1.5k

Views

PHP shell tar problem, return code 2

Want to archive a folder using tar from PHP: $result = shell_exec('tar cf $sourceFile $sourceFolder -C $source > /dev/null; echo $?'); var_dump($result); Output: string(2) '2 ' the > /dev/null; echo $? thing is for outputing the result code of a script under linux; the -C $source - changes to the...
Nick
1

votes
3

answer
2.5k

Views

uncompressing tar.Z file with python?

I need to write a python script that retrieves tar.Z files from an FTP server, and uncompress them on a windows machine. tar.Z, if I understood correctly is the result of a compress command in Unix. Python doesn't seem to know how to handle these, it's not gz, nor bz2 or zip. Does anyone know a libr...
gdebure
1

votes
1

answer
117

Views

Archive format suggestions for exporting iPad app data? Tarball?

I have an nascent iPad application, which stores 'documents' internally on the device in the file system as a series of distinct files in a folder. I'd like to try incorporating an import/export function through iTunes, using the features for OS 3.2 for this. I want to put all the document pieces th...
1

votes
1

answer
593

Views

scons: source directory does not get copied into build directory

Part of my build process is to create a tar file of an input directory, located at src/bundle/bundle. In src/bundle/SConscript: Import('*') bundleDir = Dir('bundle') jsontar = Command('bundle.tar', bundleDir, '/home/dbender/bin/mkvgconf $SOURCE $TARGET') in my SConstruct: SConscript(Split('src/bundl...
codehero
1

votes
2

answer
1.2k

Views

create a lzma file in python

i need to create a lzma file with the existing .tar file and another metadata file to further create a zip file.
surab
1

votes
1

answer
130

Views

-C option is ignored when calling tar via PHP

If I run my PHP file from the shell, then the tar command extracts to the directory I am in, rather than the one I specified using -C My command is passthru('tar xvf $file $tarfile/application $tarfile/application_detail $tarfile/application_device_type $tarfile/genre_application -C /var/www/vhosts/...
kitenski
1

votes
1

answer
2.1k

Views

solaris tar for files > 8G

I made an archive of 19G size in Solaris10 with tar E option. But now neither tar tvf nor tar xvf on the tarball works!! How can I extract the files?
Vasu
1

votes
3

answer
198

Views

tar on one line?

For some tar adept, I'm sure all of the following could be achieved on one line? mkdir site_media/media cp fixtures/media.tar site_media/media/media.tar cd site_media/media/ tar -xvf media.tar rm media.tar cd ../../
Daryl
1

votes
1

answer
2.4k

Views

tar blocksize message

I'm writing a program which untars a file. While doing untar tar command give message $ tar -xf testing_Download.txt1.tar Tar: blocksize = 12 I tried below $ tar 2>&1 1>/dev/null -xf testing_Download.txt1.tar Tar: blocksize = 12 Below was command output for tar file which was not present...
user258367
1

votes
3

answer
5.8k

Views

pack files on windows and preserve folder timestamps

I want to put a big folder on Windows box into one archive (tar, zip, gzip, whatever). Is there a tool that can preserver all folder timestamps? The timestamps have to be preserverd after unpacking the archive on a Linux box. Any ideas are welcome!
BetaRide
1

votes
1

answer
1.4k

Views

Extract tar file [duplicate]

Possible Duplicate: How do I extract a tar file in Java? I have tar file in my res/raw folder, How can I extract this file to data/data/my.project.name/folder ? Can You help me ?
Dawid Sajdak
1

votes
3

answer
2.3k

Views

Ant not excluding files from build

I'm currently building a tar: however it continuly keeps adding the target file and it's contents to the tar file dispite specifying the it to be excluded via excludes=dir
Will
1

votes
4

answer
635

Views

tar file not archiving

I am doing the following in a shell script: tar cvzf mytar.tgz * It works fine when I run the shell script from a terminal. When it runs the shell script from a cron job using crontab it looks like it is archived because the tgz file is there but the filesize is nothing and when I untar it there is...
matt
1

votes
1

answer
90

Views

Is there a way to make zip or other compressed files that extract more quickly?

I'd like to know if there's a way to make a zip file, or any other compressed file (tar,gz,etc) that will extract as quickly as possible. I'm just trying to move one folder to another computer, so I'm not concerned with the size of the file. However, I'm zipping up a large folder (~100 Mbs), and I w...
DrakeAnderson
1

votes
1

answer
101

Views

Determine .tar.gz filesize based on directory

I am not sure if this is possible, but I assume it is; I need to find out how big a gzipped tar file might be if I tarred up a specific directory. I simply want progress numbers while a long tar creation is running. If I knew how big the tar file would be once completed, I could make my own progres...
Ryan
1

votes
2

answer
1.7k

Views

ant tar task: procedure for enabling “tar append”

Goal: use ant to create a single tar archive for any combination of (say) 5 folders (all folders, or any 3 folders or any 4 folders ...). I prefer not using temp dirs and the copy command. This should be simple if the ant tar task supports append. A search lead me to: Setting mode='update' in the co...
user213887
1

votes
2

answer
214

Views

How to get the name of a TAR in a GZIP as well as the number of TARs

I was wondering if there is any Java API to get the name of the TAR file in a GZIP file as well as the number of TAR files in it. (Not sure if multiple TARs are allowed in a GZIP) This is how I access the files/directories in a TAR file FileInputStream fis = new FileInputStream(new File(sourceFile))...
Mark13426

View additional questions