ftp -i -n<
user username password
cd /apps/data
binary
lcd /home/ftp_file_root/data/20170502
mget test_file_name.*
close
bye
FTPIT
执行结果:
[oracle@localhost shell]$ ./tmp_test.sh
Kerberos Authentication not enabled.
Kerberos Authentication not enabled.
KERBEROS_V4 rejected as an authentication type
Local directory now /home/ftp_file_root/data/20170502
test_file_name.*: No such file or directory.
在线等急急急!!!
找到原因了,这个不是编写的问题,是环境变量的问题。
在linux中,有2个ftp命令,分别在
A:/usr/kerberos/bin/ftp
B:/usr/bin/ftp
A会出现这个报错,使用B则不会。
所以需要在环境变量中先设置好,优先找到B即可解决。