#!/bin/sh a=`du -s yourfile.txt | awk '{print $1}'` if [ $a -eq 1024 ] then echo "OK" else echo "ERROR" fi