Advertisement
Ham62

bash lftp rmdir.sh

Aug 10th, 2021
1,495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.18 KB | None | 0 0
  1. old_date=$(date -d "5 days ago" "+%Y-%m-%d")
  2. old_file="backup-$old_date*"
  3. lftp -u $USER,$PASS $HOST << EOF
  4.   set ssl:verify-certificate no
  5.   glob -a mrm -rf $old_file
  6.   bye
  7. EOF
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement