Tag Info

Hot answers tagged

8

Given your details, I assume that you have verified that your files really have 99% of data in common, with a contiguous (or almost contiguous) 1% of difference in them. First, you should use tar to make one archive with your files inside it. For tests, I would create a .tar with 10 files, so having a 300MB size. Then, using xz, you have to set it so that ...


7

That is because gzip stores meta-information too when using default parameters. Take a look at the -n parameter of gzip to discard that information, then you should have identical archives every time, assuming the files did not change. Try something like: tar -cf <archive_dir> | gzip -n > archive_dir.tar.gz Take a look at the gzip manpage.


7

The tar command is one of the oldest commands in *nix. It was created long long ago to do tape archives where data was stored on tape drives. When the utility was written, the current standard of putting a dash to indicate a parameter was not yet invented. It is optional for tar, but mandatory for almost every other command.


6

You can combine the two commands as following: gunzip < file.gz | bzip2 > file.bz2 This will start two processes in parallel, gunzip reading the file.gz file and outputting the non-compressed stream to bizp2 to re-compress it into file.bz2. This process does not create intermediate files, you'll need to remove the file.gz afterwards (rm file.gz).


5

If they are truly 99% similar as you say, you should be able to use bsdiff or a similar algorithm to calculate differences between the files. Is the difference cumulative (i.e., each file differs a little more from the first), or is the difference between any two files pretty much the same? If it's not cumulative, you should be able to: Take any arbitrary ...


4

Here's a few ways to do this. One thing to note is that if you're going to use separate compression and encryption tools you should always compress before encryption, since encrypted data is essentially non-compressible. These examples compress and encrypt a file called clear_text. Using gpg $ gpg -c clear_text #Compress & Encrypt $ gpg -d ...


4

Cygwin contains the necessary tools, of course. It's overkill just to unpack one tarball, but if you like the Linux command line tools, Cygwin is well worth installing.


4

Usually neither gzip nor tar can create "the absolute smallest tar.gz". There are many compression utilities that can compress to the gz format. I have written a bash script "gz99" to try gzip, 7z and advdef to get the smallest file. To use this to create the smallest possible file run: tar c path/to/data | gz99 file.gz The advdef utility from AdvanceCOMP ...


4

You just need some quotes to prevent the shell from misinterpreting the semicolons... [mpenning@tsunami ~]$ wget "http://git.cross-lfs.org/?p=bootscripts-embedded.git;a=snapshot;h=HEAD;sf=tgz" Resolving git.cross-lfs.org... 208.97.140.69 Connecting to git.cross-lfs.org|208.97.140.69|:80... connected. HTTP request sent, awaiting response... 200 OK Length: ...


3

This tar option might be what you're looking for: --no-overwrite-dir preserve metadata of existing directories I tested as follows: $ mkdir a b a/diffowner $ sudo mkdir b/diffowner $ sudo chmod a+w b/diffowner $ echo foo > a/diffowner/foo $ tar -C a -cvf test.tar diffowner diffowner/ diffowner/foo $ tar -C b --no-overwrite-dir -xvf test.tar ...


3

The line tar (child): xz: Cannot exec: No such file or directory gives you the real error. The xz programm cannot be executed, probably because it is not installed. To install the xz (de)compression tools, issue sudo apt-get install xz-utils


3

Make a symlink first, and have tar follow it. ln -s project-root something-else tar cjf foo.tar.bz2 something-else/* rm something-else The /* is necessary to follow the link and select all the contents rather than just tarring the symlink itself. You could alternatively use the -h option on GNU tar (but this will also follow links inside, which you may ...


3

You can just use tar -cf myfile.tar /etc/dir1 /var/www/html /home/somedir also, you could use tar -czf myfile.tar.gz /etc/dir1 /var/www/html /home/somedir


2

If you have tar and ssh, you can create a tarball and send it directly over ssh, by specifying - or /dev/stdout as the output file: ssh yourswitch "tar cvzf - /" > switch.tgz


2

Finally, I realized the reason I cannot let tar detect and decompress the archive from stdin is that I use GNU tar. BSD tar can do it automatically without problem. So I decide to use bsdtar instead of tar in my script now.


2

I had problems with unpacking tar and zip files I receive from Windows users. While I do not answer the question "how to create the archive which will work", the scripts below help to unpack tar and zip files correctly regardless the original OS. WARNING: one has to tune the source encoding manually (cp1251, cp866 in examples below). Commandline options ...


2

This happens because you have like multiple tar.exe, and one of them might be provided by git on windows. In terms of fixing this problem, you might want to adjust the order of path. Try putting the path for the real tar at the beginning of the PATH env.


2

You don't. Unix local sockets are created as soon as a program attempts to listen on the given path for connections, and despite being a type of file they only act as pointers to in-memory structures; so they are useful only as long as the program is still running (and only within the same machine; no NFS or anything such). After the program exits, the ...


2

minerd is the program you downloaded. Run it. ./minerd


2

It is not required to copy the file to /bin directory. You may either copy it into the /usr/bin directory or create a symlink like so ln -s /path/to/exec /usr/bin/progname. You might need to use sudo according to your configuration. Symbolic linking is better under most of the circumstances. And don't forget to chmod +x progfile to make it executable.


2

First, make a backup of the 50GB to another computer such as your own computer or a different host. Second, explain your situation to the new web host. Ask them if you could have them temporarily mount you a special /tmp2 that will have at least 50GB (maybe 55GB). Then have them move your tar file to the /tmp2. Now, that your server has 100GB free, you can ...


2

If you are referring to GNU tar, then as per the manual, it checks the modified time against the one in the archive. So this would be mtime. http://www.gnu.org/software/tar/manual/html_section/Advanced-tar.html#SEC62 For a file that had been modified, ctime would remain the same, so wouldn't be a valid check. tar does not do md5 checks.


2

You use the file command - which should tell you what it is. However, grabbing the file from that link downloads an error page, and I don't have an oracle login.


2

You'll want to add the P (or -P) flag to your command line. From the manpage: -P Preserve pathnames. By default, absolute pathnames (those that begin with a / character have the leading slash removed both when creating archives and extracting from them. Also, tar will refuse to extract archive entries whose pathnames ...


2

Try using the -t flag to see how the filename is stored, then specify the same name at the end of your extraction tar command, including any path/directories. As in tar --extract --file=some.tar exactfilename


2

./ means the current directory. Your two listings are identical. Having ./ in front of the file when listing the archive helps to handle files with a special name. A file name -file will be displayed as ./-file allowing to be processed by a second tool.


2

Looking at the error you are seeing coupled with the fact that you can indeed decompress it says that the file is a genuine TAR/Gzip archive, but perhaps not an immediate TAR is created after the Gzip. Meaning, if you downloaded this from a web server, sometimes Gzip compression get’s applied to web content on the server level to speed up content download. ...


1

I found this link which might be helpful. However, I'm not currently on any of my computers running Linux so I cannot try it out for myself. Regardless, I would like to recommend qbittorrent (install guide) if you keep running into issues. All you need to do is add the debian source and do a simple: apt-get update apt-get install qbittorrent I use it ...


1

You'll end up with inconsistent data in your tar file. The question you didn't quite ask is that tar does not grab all of the files atomically at the start of your tar session. It may (or may not) grab a list of the files atomically at the start of your tar session, but it will read and store each file individually and sequentially. If you have files a ...


1

I'm not personally familiar with it, but the tar manual does indicate there is a backup feature --backup=typeofbackupthat you can use to avoid overwriting files when extracting an archive, or when creating an archive. The different types of backups are: t, numbered, nil, existing, never, and simple. GNU tar offers options for making backups of files ...



Only top voted, non community-wiki answers of a minimum length are eligible