Hi Everyone,
Good Day, Seeking for your assistance to check if the disk capacity reach its usage into 70% then sftp all files in the specific folder. i know only the command df -h, but i don't know where to insert the sftp when it reach 70%
Example:
Directory: /appl/Files
df -h
varlock 393M 0 393M 70% /var/lock
When it reach 70% util, all files in the directory will be sftp on the different server.
#SFTP
HOST='xxx.xx.xx'
USER='username'
INPUT_DIR1='/appl/Files/'
INPUT_DIR2='/appl/FTP/'
sftp ${USER}@${HOST} <<EOF
cd ${INPUT_DIR2}
put *.csv
EOF
exit
Please advise,
Thanks,