getmyapi.blogg.se

Zip a file for mac
Zip a file for mac









zip a file for mac
  1. #Zip a file for mac how to#
  2. #Zip a file for mac zip file#

This means that if you’ve decided to archive User/YourUserName/Desktop/pictures, the archive that’s created will be extracted in to a folder called User and it will follow the directory structure that was in the folder’s original path. You should not drag & drop the folder you want to archive on to the Terminal because it adds the folder’s entire path to the archive. The above example will compress everything in FolderName/ into multiple split archives of 3GB maximum each, with the name of the main archive file being archive.zip.

#Zip a file for mac zip file#

If you would like the file size to be measured in other units, follow the number with k for KB, g for GB, and t for TB. ArchiveName.zip is the name that the primary zip file of the archive will be saved as, and FolderName/ is the folder containing everything you want to pack in this archive.Īn example would be: zip -r -s 3g archive.zip FolderName/ If you want to change the file size but keep it in MB, simply change the number. It is specified as a number and is in MB by default. The command is as follows: zip -r -s MaximumSize ArchiveName.zip FolderName/Īs the name suggests, the MaximumSize part is the maximum possible size each split file should be.

zip a file for mac

You need only run a simple command to create the split archive, but it’s important that you understand its syntax in order to customize it for your needs.

#Zip a file for mac how to#

In what follows, we are going to show you how to use a Terminal command to easily create split zip archives of the contents of any folder.

zip a file for mac

There are several third-party apps available that allow you to do this but if you just want to quickly do it without using a third-party app, and don’t mind typing in a command for the purpose, you can easily do so from Terminal. What the default utility can’t do is create an archive of a folder that’s split into smaller zip files that can later be extracted as a whole into a single folder. With no UI to speak of, the app works in the background and is fairly basic. OS X comes with the aptly named Archive Utility that can be used to extract contents of compressed zip files, or create zipped archives of your own from your files and folders via the options provided in the right-click context menu.











Zip a file for mac