FILE=a.txt
FILE_SIZE = `stat -c %s $FILE`
if [ $FILESIZE >= 1000 ]; then
cp $FILE /tmp/
# How to empty file ?
then
I am trying to get size of file and if the size is over limited and cp those file and empty the same file
How to acheive this ?