Skip to content

Instantly share code, notes, and snippets.

@gelias
Created August 12, 2016 19:36
Show Gist options
  • Select an option

  • Save gelias/778d99d78835198736c9fe0b4cac748c to your computer and use it in GitHub Desktop.

Select an option

Save gelias/778d99d78835198736c9fe0b4cac748c to your computer and use it in GitHub Desktop.
#!/bin/bash
HOST='host'
USER='username'
PASSWD='password'
REMOTE_FOLDER='remote_folder'
ftp -n -v $HOST << EOT
ascii
user $USER $PASSWD
prompt
cd $REMOTE_FOLDER
ls -la
bye
EOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment