Skip to content

Instantly share code, notes, and snippets.

@CodeBrauer
Created April 8, 2015 13:22
Show Gist options
  • Select an option

  • Save CodeBrauer/4675bc8565a0857bf1c8 to your computer and use it in GitHub Desktop.

Select an option

Save CodeBrauer/4675bc8565a0857bf1c8 to your computer and use it in GitHub Desktop.
split files under mac os x - very simple!
#!/bin/bash
# just edit the path and the file and run it.
FATFILE="/path/to/big_fat_file.zip"
SAVEPATH="path/to/save/split/files/part_" # notice the end is '/part_'
# 3221225472 byte = 3GiB // perfect for FAT32... (main reason to split files..)
SPLITSIZE="3221225472"
split -b $SPLITSIZE $FATFILE $SAVEPATH
#!/bin/bash
clear
echo -ne "\n\n"
echo "This action will take some time!"
echo -ne "\n\n"
sleep 1
cat part_* > big_fat_file.zip # < edit extension if needed
# if the file is not a zip comment this out with '#'
unzip big_fat_file.zip
rm big_fat_file.zip
clear
echo -ne "\n\n"
echo " == Yay - now can access your files! =="
echo -ne "\n\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment