folder_size=$(du -s /mnt/data/storage/ | awk '{print $1}') available_space=$(df /tmp | awk 'NR==2 {print $4}') echo $folder_size echo $available_space if [[ "$folder_size" -gt "$available_space" ]]; then echo "Error: Folder size exceeds available space in $(realpath $DESTINATION_DIR/)." else echo "Folder size is within available space in $(realpath $DESTINATION_DIR/)." fi