Skip to content

Instantly share code, notes, and snippets.

@fitorec
Last active March 16, 2017 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitorec/310848 to your computer and use it in GitHub Desktop.
Save fitorec/310848 to your computer and use it in GitHub Desktop.
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