41
18
I have a 5 GB file on my MAC and can not copy it on flash memory or external hard formatted with FAT. How I can split it to some smaller files
41
18
I have a 5 GB file on my MAC and can not copy it on flash memory or external hard formatted with FAT. How I can split it to some smaller files
40
You can use this command on the shell:
split -b YOUR_EXPECTED_SIZES YOUR_FILE_NAME PATTERN_NAME_AS_OUTPUT
and for recovering it
cat SPITED_FILES_AS_LIST > NEW_FILE
I hope it be useful for you!
3If you get illegal byte count
after running split -b 500M input_file.tar.gz output_files.tar.gz.
, you need to provide the integer byte count:
split -b 500000000 input_file.tar.gz output_files.tar.gz.
– Sam Malayek – 2018-10-24T22:30:13.820
2@LXXIII for what it's worth, I discovered that it's case sensitive! so while -b 20K
doesn't work, -b 20k
worked like a charm :) – fire – 2019-04-19T05:52:04.277
67
I needed a bit more detail than Hamed's answer offered, here's what works for me, based on comments at hints.macworld.com:
split -b 1024m "YourFile.iso" "YourFile.iso."
This results in as many 1024mb files as required, (and one smaller file at the end) like so:
I like to use the original filename and add '.' at the end so that its really clear what the file is at a glance.
I chose 1024mb files because VOBs seem to be that size, and Toast splits files to 1024mb, too - they must have a good reason!
To join these up again:
cat YourFile.iso.* > YourFile.iso
Note that the first argument here ends in .*, which will get all the aa, ab, ac, etc at once.
Also, if the file your producing already exists, it is silently overwritten (no renamed duplicate like in Finder). The mac version of split is slightly different to the linux version, it seems (for one, numeric suffixes (-d) are not supported).
Revisiting this following Andy Ibanez's comment that his before
and after
didn't match... here's my test:
ls -la
total 22336
drwxr-xr-x 3 ptim staff 102B 20 Feb 23:10 .
drwx------+ 76 ptim staff 2.5K 20 Feb 23:09 ..
-rw-r--r--@ 1 ptim staff 11M 20 Feb 23:10 test.mp4
split -b 1m test.mp4 test.split.
ls -la
total 44672
drwxr-xr-x 14 ptim staff 476B 20 Feb 23:10 .
drwx------+ 76 ptim staff 2.5K 20 Feb 23:09 ..
-rw-r--r--@ 1 ptim staff 11M 20 Feb 23:10 test.mp4
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.aa
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.ab
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.ac
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.ad
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.ae
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.af
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.ag
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.ah
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.ai
-rw-r--r-- 1 ptim staff 1.0M 20 Feb 23:10 test.split.aj
-rw-r--r-- 1 ptim staff 927K 20 Feb 23:10 test.split.ak
cat test.split.* > test.reconstituted.mp4
cat test.mp4 | md5
08db84d1806ec293582d217ed53b034c
cat test.reconstituted.mp4 | md5
08db84d1806ec293582d217ed53b034c
I'm on OSX, but using bash from homebrew, and I been bitten by discrepancies between OS's before... maybe somone else can suggest a reason for md5's not matching in the above scenario...
I did this and then I did a quick cat YourFile.iso | md5
to verify that that concatenated ISO is indeed the same as the original one. It wasn't. – Andy Ibanez – 2017-02-19T21:42:40.633
Yow! sorry ta hear that... in my tests, the md5 matches nicely :( maybe an OS discrepancy? – ptim – 2017-02-20T12:09:20.060
updated with a quick test... video still plays! – ptim – 2017-02-20T12:24:17.423
When I put my ISO back together I could explore some folders without an issue. Sadly I can't really test if it was rebuilt properly as I don't have a device that can reproduce that kind of ISOs right now. – Andy Ibanez – 2017-02-20T12:50:57.867
I found that when concatenating to an NTFS drive (on Mac using a paragon driver) the result was different, but when concatenating to an HFS+ drive the result was correct. The split files were on the NTFS drive for both attempts. – Chris – 2017-10-21T09:31:17.970
4
Using hard disk utility you can create a sparse bundle on your fat drive. Inside this also larger files are allowed - the system will take care of the rest.
You can also format the stick with HFS or if you need it also on Windows install NTFS-3G and format the drive NTFS
2Even better format as exFAT, then the whole file works and both Windows and macOS can read and write to it. – Steve Chambers – 2018-09-09T13:01:20.680
Look into RAR tools. – Alex Reynolds – 2011-11-28T11:37:36.720
2I am looking for a free solution. – None – 2011-11-28T11:40:44.327