Skip to content

Instantly share code, notes, and snippets.

@fitorec fitorec/ftpDownloadPath.sh
Last active Mar 16, 2017

Embed
What would you like to do?
logearse descargar todo directorio de un servidor ftp con el wget
# ftpDownloadPath.sh fitorec 2010
# ______ , __
# | |(_) | o /|/ \
#--+--+-- _|_ _|_ __ |___/ _ __
#--+--+--/ | || | / \_| \ |/ /
# | | (_/ |_/|_/\__/ | \_/|__/\___/
#Linea muy útil descarga todo el directorio mypath de myserver
#previamente abre una sesión ftp apartir del login username password
#opciones del wget:
# -r : modo recursivo
# -np : No parent no intentara ir a directorios superiores
# --ftp-user : nombre del usuario para logearse
# --ftp-password : contraseña respectiva
#
#se ejecuta como: ./ftpDownloadPath.sh username password
if [ $# -ne 2 ]
then
echo "Usage: ./$0 userUTM password"
exit 1
fi
wget -r -np --ftp-user="$1" --ftp-password="$2" ftp://myserver.com/public_html/mypath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.