Home > Questions

How to compress, split, and combine files on Mac?

I have a 5GB file on my Mac, and I want to compress it and split it into several parts. Is there any way I can split the compressed file and whether I can combine the split files if I want later? Thanks!

Best Answered by

iBoysoft author Amanda Wong

Amanda Wong

Answered on Monday, April 29, 2024

The answer is YES. You should first compress the file on Mac, and then split the file into several files. When you need to view the file, you need to rejoin it first.

There are multiple ways you can choose to compress a file on Mac:

  1. Right-click the file and select Compress "file name" from the menu.
  2. Compress audio on Mac using QuickTime Player. 
  3. Compress video on Mac using iMovie or QuickTime Player.
  4. Zip a file on your Mac with an online compressor.
  5. Zip a file on your Mac using the Terminal command "zip archive_name.zip file_to_zip"
  6. Compress files using a third-party compressor for Mac such as iBoysoft MagicMenu.

Although you compress the 5GB file and perhaps the compressed file is still too large to store and transfer, therefore, you wonder whether you can split the file into several parts and recombine them later. Yes, you can do it in that way.

Run the command in Terminal, the macOS built-in tool, you can split the compressed files and rejoin them. You should follow the steps carefully to avoid damaging the OS, and back up the Mac so that you can restore it if any unexpected situation happens.

  1. Launch Terminal from Finder > Applications > Utilities.
  2. Type the command below, replace 'byte_count[K|k|M|m|G|g]' with the chunk size you'd like, replace [file] with the path to the file you'd like to split, replace [prefix] with the path prefix to your chunked file names, or example, "split -b 1G /Users/iClarified/Desktop/IMG_0192.MOV /Users/iClarified/Desktop/IMG_0192.MOV."split -b byte_count[K|k|M|m|G|g] [file] [prefix]
  3. Press Enter to run the command.
  4. Use the following command to combine multiple files, you should replace file.ext with your original filename, for example, "cat IMG_0192.MOV* > IMG_0192.MOV." cat file.ext.* > file.ext
  5. Or use the cat command to combine files with unique names as well: cat filename1.ext filename2.ext filename3.ext > filename.txt
  6. Press Enter to combine the files.

People Also Ask

Read More Questions

Read More Advice From iBoysoft's Computer Experts

How to Compress Audio Files on Mac

How to Compress Audio Files on Mac?

It tells how to compress audio files on Mac in 2 ways, including using iBoysoft MagicMenu and macOS QuickTime Player.

How to Tips

Como compactar um arquivo ou pasta no Mac

Como Compactar ou Descompactar arquivos ou pastas no Mac (Passo-a-passo)

Guia para aprender como compactar arquivos e pastas no Mac e como descompactá-los.

Macでファイルまたはフォルダを圧縮する方法

How to Zip or Unzip files or folders on Mac (Step-by-step)

Guide to learning how to zip files and folders on Mac and how to unzip files and folders on Mac.