Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Deleting a file with LFTP using variables
- USERNAME="theuser"
- PASSWORD="verygoodpassword"
- SERVER="example.com"
- BACKUPDIR="thebackups"
- FILETODELETE="uselessfile.obsolete"
- lftp -e 'rm /${BACKUPDIR}/${FILETODELETE}; bye' -u $USERNAME,$PASSWORD $SERVER
- lftp -e 'rm /thebackups/uselessfile.obsolete; bye' -u theuser,verygoodpassword example.com
- lftp -e 'rm /${BACKUPDIR}/${FILETODELETE}; bye' -u theuser,verygoodpassword example.com
- USERNAME="theuser"
- PASSWORD="verygoodpassword"
- SERVER="example.com"
- BACKUPDIR="thebackups"
- FILETODELETE="uselessfile.obsolete"
- lftp -e "rm /${BACKUPDIR}/${FILETODELETE}; bye" -u $USERNAME,$PASSWORD $SERVER
Add Comment
Please, Sign In to add comment