I am trying to get a list of all the files that we have on the server (in particular, every PDF file that we have). I tried using a generic command and looking for files. It worked to some extent, as in, I got a list of each pdf file that we had there, but in no way exported the results (we have more than 100,000 files)
I tried using a bash script to get the information, but I am not very good at Linux, and I really don't know what I'm doing.
My script looks like this:
#!/bin/bash hostname="<host>" ftp -i -nv $hostname << EOF user <username> <password> ls -R EOF
Running above script i get
?Invalid command 501 Illegal PORT command ftp: bind: Address already in use 221 Goodbye
Any help or guidance on what to look for would be greatly appreciated.
Raz
source share