File size: 657 Bytes
89935ce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

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."