Guest User

Untitled

a guest
Jul 29th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Deleting a file with LFTP using variables
  2. USERNAME="theuser"
  3. PASSWORD="verygoodpassword"
  4. SERVER="example.com"
  5. BACKUPDIR="thebackups"
  6. FILETODELETE="uselessfile.obsolete"
  7.  
  8. lftp -e 'rm /${BACKUPDIR}/${FILETODELETE}; bye' -u $USERNAME,$PASSWORD $SERVER
  9.  
  10. lftp -e 'rm /thebackups/uselessfile.obsolete; bye' -u theuser,verygoodpassword example.com
  11.  
  12. lftp -e 'rm /${BACKUPDIR}/${FILETODELETE}; bye' -u theuser,verygoodpassword example.com
  13.  
  14. USERNAME="theuser"
  15. PASSWORD="verygoodpassword"
  16. SERVER="example.com"
  17. BACKUPDIR="thebackups"
  18. FILETODELETE="uselessfile.obsolete"
  19.  
  20. lftp -e "rm /${BACKUPDIR}/${FILETODELETE}; bye" -u $USERNAME,$PASSWORD $SERVER
Add Comment
Please, Sign In to add comment