tar: add all files and directories in current directory INCLUDING .svn and so on

Don’t create the tar file in the directory you are packing up: tar -czf /tmp/workspace.tar.gz . does the trick, except it will extract the files all over the current directory when you unpack. Better to do: cd .. tar -czf workspace.tar.gz workspace or, if you don’t know the name of the directory you were in: … Read more

How to extract filename.tar.gz file

If file filename.tar.gz gives this message: POSIX tar archive, the archive is a tar, not a GZip archive. Unpack a tar without the z, it is for gzipped (compressed), only: mv filename.tar.gz filename.tar # optional tar xvf filename.tar Or try a generic Unpacker like unp (https://packages.qa.debian.org/u/unp.html), a script for unpacking a wide variety of archive … Read more

How to check if a Unix .tar.gz file is a valid file without uncompressing?

What about just getting a listing of the tarball and throw away the output, rather than decompressing the file? tar -tzf my_tar.tar.gz >/dev/null Edited as per comment. Thanks zrajm! Edit as per comment. Thanks Frozen Flame! This test in no way implies integrity of the data. Because it was designed as a tape archival utility … Read more

Are tar.gz and tgz the same thing? [closed]

I think in the old package repo days, .tgz was used because files on DOS floppies could only have three letter extensions. When this limitation was removed, .tar.gz was used to be more verbose by showing both the archive type (tar) and zipper (gzip). They are identical.

Create a tar.xz in one command

Use the -J compression option for xz. And remember to man tar 🙂 tar cfJ <archive.tar.xz> <files> Edit 2015-08-10: If you’re passing the arguments to tar with dashes (ex: tar -cf as opposed to tar cf), then the -f option must come last, since it specifies the filename (thanks to @A-B-B for pointing that out!). … Read more

What is the difference between tar and zip? [closed]

tar in itself just bundles files together (the result is called a tarball), while zip applies compression as well. Usually you use gzip along with tar to compress the resulting tarball, thus achieving similar results as with zip. For reasonably large archives there are important differences though. A zip archive is a collection of compressed … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)