Autobackup if directory size is more than 25 MB bash
echo -e "Enter your directory: c"
read -r dirname
cal_size=$(sudo du -sm $dirname | cut -f 1)
if [ $cal_size -gt 25 ]; then
sudo tar -cf /backup/$dirname.tar $dirname
else
echo "Backup is not important, you can skip!"
fi