Skip to content

Instantly share code, notes, and snippets.

@lozybean
Created May 11, 2017 04:48
Show Gist options
  • Save lozybean/440b8b5f17006512caac9c38ae0c4218 to your computer and use it in GitHub Desktop.
Save lozybean/440b8b5f17006512caac9c38ae0c4218 to your computer and use it in GitHub Desktop.
a shell script use lftp recursive download a directory on remote server;
#!/bin/bash
REMOTE_DIR=
USER=
PASSWD=
HOST=ftp://
lftp -u ${USER},${PASSWD} ${HOST} << EOF
mirror --use-pget-n=10 ${REMOTE_DIR}
bye
EOF
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment