#!/bin/bash filename="some-file-name" filesize=$(stat --printf="%s\n" $filename) minimum="100000000" expected=$(( minimum / 1000000 )) if [ "$filesize" -le "$minimum" ]; then printf "File $filename is smaller than $expected"mb." aborting...\n\n" rm $filename ; exit else printf "File $filename is greater than $expected"mb." continuing...\n\n" fi