echo "Starting the script..." | |
# Find all .gguf files in the current directory | |
for file in $(find . -type f -name "*.gguf") | |
do | |
echo "Checking file: $file" | |
# Get file size in GB | |
filesize=$(du -B1G "$file" | cut -f1) | |
# If file size is greater than 45GB | |
if [ $filesize -gt 45 ] | |
then | |
echo "File $file is larger than 45GB. Splitting it into chunks..." | |
# Split the file into chunks of 45GB | |
split -b 45G "$file" "${file}_part_" | |
echo "File $file has been split into chunks of 45GB." | |
else | |
echo "File $file is not larger than 45GB. Skipping..." | |
fi | |
done | |
echo "Script finished." | |