How to create a .TAR.GZ (GZip) archive on macOS without application installed

You probably know that Mac OS X / MacOS o .ZIP archive can create very simple, by selecting the folders and files to be archived, right-click, and from the "context menu" select the option: "Compress No. Files".

The archive file will be created in the current folder with the name: “Archive.zip".

A much more advanced form of archiving, used especially when we have to make archives that contain many files and folders, is .TAR.GZ.
.tar.gz (GZIP) comes with a archiving algorithm developed for UNIX systems / Linux.  DEFLATE algorithmUsed to enable GZIP archive Better compression files with minimal or non-existent. In .ZIP archives it often happens that archived files appear as "corrupt”And unusable.

users MacOS very simple to archive files from one or more folders using command line in Terminal.

Command line for archiving .tar.gz from Terminal, is identical to the one on Linux:

tar -cvzf nume_arhiva.tar.gz folderdearhivat

In the scenario shown in the screenshot above, the “wp-content.tar.gz” archive of the “wp-content” folder in WordPress.

If you want to archive all pictures in a folder, you can use the command line:

tar -cvzf nume_arhiva.tar.gz /calea/folder/poze/*.jpg

Using "*" before the ".jpg" extension, you will only archive files that use this extension.

Extracting an archive .tar.gz is via the command line:

tar -xvf nume_arhiva.tar.gz

The archiving command can be combined with advanced parameters. Use "-R”To archive, for example, all the photos in several folders, ignoring other files that can be found there.

Passionate about technology, I enjoy writing on StealthSettings.com since 2006. I have a rich experience in operating systems: macOS, Windows, and Linux, as well as in programming languages and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, PrestaShop).

How to » iHowTo » iHowTo - macOS » How to create a .TAR.GZ (GZip) archive on macOS without application installed
Leave a Comment