Solution: ftp: u: unknown option when run FTP from crontab

It is because multiple ftp program in the system! I figure it after developer told me this interesting issue. /user/bin/ftp and /usr/kerberos/bin/ftp coexisted there, the former doesn’t support -u option. Please give path in your ftp call.

[report@db02 ~]$ /usr/bin/ftp -u
ftp: u: unknown option

[report@db02 ~]$ /usr/kerberos/bin/ftp -u
ftp> quit

[report@db02 ~]$ ls -al /usr/kerberos/bin/ftp
-rwxr-xr-x 1 root root 109472 Mar 18  2010 /usr/kerberos/bin/ftp

[report@db02 ~]$ ls -al /usr/bin/ftp
-rwxr-xr-x 1 root root 84200 Jul 21  2008 /usr/bin/ftp

[report@db02 ~]$ /usr/bin/ftp -help

        Usage: { ftp | pftp } [-pinegvtd] [hostname]
           -p: enable passive mode (default for ftp and pftp)
           -i: turn off prompting during mget
           -n: inhibit auto-login
           -e: disable readline support, if present
           -g: disable filename globbing
           -m: don't force data channel interface to the same as control channel
           -v: verbose mode
           -t: enable packet tracing [nonfunctional]
           -d: enable debugging

[report@db02 ~]$ /usr/kerberos/bin/ftp -help
ftp: h: unknown option
Usage: /usr/kerberos/bin/ftp [-v] [-d] [-i] [-n] [-g] [-k realm] [-f] [-x] [-u] [-t] [host]

About bigpang

Database Architect, AWS certified database specialist, Oracle certified cloud architect, Perl and Python advocate
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

1 Response to Solution: ftp: u: unknown option when run FTP from crontab

  1. Pingback: Solution: ftp: u: unknown option when run FTP from crontab | 老庞闲话

Leave a comment