To check file size in hadoop
<p>i Need to check the size of file in hdfs and check if the file is less than 10KB then print error along with file name</p>

<pre><code>Minsize=10
for Actualsize in `hadoop fs -du -h /path | cut -d" " -f1`
do
if [ $Actualsize -lt $Minsize ]; then
    echo "File generated incorrectly for $file : Filesize - $Actualsize KB "
    echo "Exiting from Script file size found less than 10KB"
  exit 1;
fi
done
</code></pre>

<p>Getting the error like
integer expression expected</p>

<p>Moreo over i need to print the filename as well File generated incorrectly for $file</p>