How to Zip/Compress a File or Folder on Mac with Password, Use Terminal, Add Multiple Files


If you want to share or download files or folder on a frequent basis then there is a way to share/download files easily that is “Zipped/compressed” Files. By zipping the file you can reduce the size of the file, easy and faster to upload or download. In this, you can secure your file through set a secret password. And also add Multiple files in a single zip file it will help to share or download multiple pages.  You all know that Mac OS is based on Unix so we can zip/compress the file in any way on the way compressed by Terminal or Command line interface. By using Terminal you can be compressed in the zip, tar, gz, bz2, gz, and dmg. If you are interested to know how to Zip/Compress a file on Mac? If yes then follow those ideas.
How to save a file or folder to Zip/Compress format

  1. Open Finder window.
  2. Select the file or folder you wish to convert as zip/compress.
  3. Right Click or Control-Click the file or folder.
  4. Now a pop-up menu will be displayed and then tap Compress [name of the file].
  5. Wait for a few minutes.
  6. Then a new .zip file will be created on the same page.

How to save a multiple  file or folder to Zip/Compress format

  1. Open Finder window.
  2. Select the multiple file or folder you wish to zip/compress.
  3. Right Click or Control-Click the file or folder.
  4. Now a pop-up menu will be displayed and then tap Compress [X item].
  5. Here X items denote the number of files or folders.
  6. Wait for a few minutes.
  7. Then a new .zip file will be created on the same page.

How to unzip a file or folder

  1. Open Finder window.
  2. Select the file or folder that you want to unzip.
  3. Double-click the zip file.
  4. Click Decompressed item.
  5. Otherwise Launch Terminal.
  6. Click Desktop.
  7. In this window enter the command like “Unzip foldername.zip”

How to create a password for the zip file

  1. Launch Terminal.
  2. Click Desktop.
  3. In this window enter the command line as “zip -er Folder-name.zip drag the file you want to zip (or)  type the location where your file has saved”. Click Enter key.
  4. Here you should create a password. Click Enter key.
  5. To confirmation again enter the password on “Verify password”.
  6. Again move to the finder window and then find your zip file.
  7. Open the zip file. While you open the file it will ask for a password. then enter your password

How to save a file or folder in the tar.gz format

  1. Launch Terminal.
  2. Click Desktop.
  3. In this window enter the command line as “tar -zcvf folder_name.tar.gz drag the file you want to zip (or)  type the location where your file has saved” this is for creating a new tar.gz format.
  4. To extract the tar.gz file follow “tar -zxvf folder_name. tar.gz”

How to save a file or folder in the tar.bz2 format

  1. Launch Terminal.
  2. Click Desktop.
  3. In this window enter the command line as “tar -jcvf folder_name.tar.bz2 drag the file you want to zip (or)  type the location where your file has saved” this is for creating a new tar.gz format.
  4. To extract the tar.gz file follow “tar -jxvf folder_name. tar.bz2”

How to save a file or folder in the dmg format

  1. Launch Terminal.
  2. Click Desktop.
  3. In this window enter the command line as “hdiutil create -format UDZO -src/ folder-to-compress /folder_name.dmg”
  4. To mount the dmg folder then “hdiutil attach foldername.dmg”
  5. To view your file then type “ls -lah /volumes/foldername/”
  6. To eject your file then type “Hdiutil eject /volumes/foldername/”
  7. To compress image then type  “Hdiutil UDZO/volumes/foldername/”
  8. To read only images then type “Hdiutil UDRO/volumes/foldername/”
  9. To read/write images then type “Hdiutil UDRW/volumes/foldername/”
  10. To DVD disk images then type “Hdiutil UDTO/volumes/foldername/”Hope the above methods will be useful for you. If you have any doubt regarding this article, please share us via comments. Thank You.
10:24 am

Leave a Reply