59

How can I create a multipart 7zip file in Linux using the p7zip console client?

Many people referred me to it. My console app is

7-Zip [64] 9.13 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-04-15
p7zip Version 9.13 (locale=C,Utf16=off,HugeFiles=on,4 CPUs)
3
  • 1
    IMO the best solution is to avoid 7-zip and use xz. To split archives, read here: stackoverflow.com/questions/1120095/… Commented Sep 27, 2014 at 11:05
  • Thank you. I'm not even for sure the xz option was even standard on most distros when I originally asked this question.
    – hopeseekr
    Commented Dec 7, 2014 at 0:09
  • I came back to my question after 13 years ;-) 7z v17.05
    – hopeseekr
    Commented Nov 28, 2023 at 17:25

1 Answer 1

98

Use the -v option (v is for volume) -v100m will split the archive into chunks of 100MB.

7z -v option supports b k m g (bytes, kilobytes, megabytes, gigabytes)

Example: 7z -v100m a my_zip.7z my_folder/

6
  • 4
    Be aware that 7zip doesn't preserve file ownership information on Linux. Commented Sep 4, 2010 at 15:10
  • 7z seem not to append files if file are already in the archive or if archive already exists. Commented Jun 8, 2016 at 14:13
  • 2
    Also works on OSX using brew install p7zip.
    – johnthagen
    Commented Oct 27, 2016 at 14:58
  • 31
    Full command example: 7z -v100m a my_zip.7z my_folder/
    – johnthagen
    Commented Nov 11, 2016 at 18:33
  • 1
    The example command creates 100m volumes named my_zip.7z.001, my_zip.7z.002, etc. To extract from these volumes, use this command: 7z e my_zip.7z.001. Even though you are specifying only the the first part in the command, the command will look for all the parts in the same folder and extract it.
    – djruss70
    Commented Feb 16, 2023 at 1:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .