I am trying to get the size of each file in a directory using a for loop, running the below script#!/bin/bashFILE=/home/cloudera/Desktop/newfor    file in $FILEdo       size=`du -b ${file} | cut -f1`       echo $sizedoneI am getting following error:du cannot access /home/cloudera/Desktop/new/a.txt du cannot access /home/cloudera/Desktop/new/b.txt du cannot access /home/cloudera/Desktop/new/c.txtwhere a.txt,b.txt.c.txt are files inside new directory.
Find size of file in unix using for loop
bash