How to create multipart 7zip file in Linux?

34

7

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)

hopeseekr

Posted 2010-09-04T04:36:14.100

Reputation: 902

1

IMO the best solution is to avoid 7-zip and use xz. To split archives, read here: http://stackoverflow.com/questions/1120095/split-files-using-tar-gz-zip-or-bzip2

– Marco Sulla – 2014-09-27T11:05:37.457

Thank you. I'm not even for sure the xz option was even standard on most distros when I originally asked this question. – hopeseekr – 2014-12-07T00:09:12.553

Answers

57

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/

Nifle

Posted 2010-09-04T04:36:14.100

Reputation: 31 337

7z seem not to append files if file are already in the archive or if archive already exists. – MUY Belgium – 2016-06-08T14:13:09.637

1Also works on OSX using brew install p7zip. – phoenix – 2016-10-27T14:58:14.147

25Full command example: 7z -v100m a my_zip.7z my_folder/ – phoenix – 2016-11-11T18:33:06.233

2Be aware that 7zip doesn't preserve file ownership information on Linux. – Paused until further notice. – 2010-09-04T15:10:31.050