Skip to content

Instantly share code, notes, and snippets.

@mtrl
Created July 11, 2011 11:34
Show Gist options
  • Save mtrl/1075693 to your computer and use it in GitHub Desktop.
Save mtrl/1075693 to your computer and use it in GitHub Desktop.
ncftpget recursive download from list of dirs
#!/bin/bash
a=0
while read line
do a=$(($a+1));
echo $line;
mkdir $line;
cd $line;
ncftpget -u USER -p PASSWORD -R -d stdout -t 300 "ftp://[HOST]/$line"
cd "..";
done < "../dir-list"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment