Last active
March 16, 2017 13:11
-
-
Save fitorec/310848 to your computer and use it in GitHub Desktop.
logearse descargar todo directorio de un servidor ftp con el wget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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