1 #!/bin/bash 2 if [ -d "/tmp" ]; then 3 echo "/tmp is exists" 4 else 5 mkdir /tmp 6 fi 7 if [ -f "/tmp/size.log" ]; then 8 echo "size.log is exist";cat /tmp/size.log 9 else 10 touch /tmp/size.log; date > /tmp/size.log; echo "date has been successfully written to size.log" 11 fi