elide писал(а): ↑15.05.2007 16:09
поставь lftp и почитай к нему man.
посмотрел lftp (он оказывается у меня стоял с дистрибутивом):
Код: Выделить всё
Usage: lftp [OPTS] <site>
`lftp' is the first command executed by lftp after rc files
-f <file> execute commands from the file and exit
-c <cmd> execute the commands and exit
--help print this help and exit
--version print lftp version and exit
Other options are the same as in `open' command
-e <cmd> execute the command just after selecting
-u <user>[,<pass>] use the user/password for authentication
-p <port> use the port for connection
<site> host name, URL or bookmark name
плохо что
-c <cmd> почему-то не работает:
Код: Выделить всё
# lftp -u user,pwd -c ls ftp.mysite.ru
lftp: invalid option -- c
Try `lftp --help' for more information
потому что при
-e <cmd> команда хоть и выполняется ( lftp -u user,pwd -e "put ~/home/file.tar" ftp.mysite.ru ), но выполенение скрипта подвисает, почскольку не выходит с фтп((