Compress file as .tar.gz instead of .zip

archivecompressiontarzip

If I right click a file and I compress it I obtain a file.zip. Is it possible to set right click–>compress to produce a file.tar.gz as output? I always have to do it through terminal but many times I'd rather do it with a right click especially when I'm already in the finder looking at the folder

Best Answer

You can try to write a unix shell script where your commands are to tar the selected files then run gzip on it.

Then you can make this a service and save it at ~/Library/Services. Then enable it via system preferences > Keyboard > shortcuts > Services.

Then you can select a file and right-click on the selected file. At the bottom of the right click menu, a section for Services appears which has your services. Select your new service and that should do the job.

Alternatively, it can be found in Finder menu > Services.