- 论坛徽章:
- 0
|
本帖最后由 ethief 于 2011-06-03 15:32 编辑
目录可创建。批量文件可上传。当然,使用nautilus可直接上传目录。
但是ftp客户端,为什么不能上传目录?(目录里又包含了很多文件),求高人解释!
补充:
ftp> !ls -l
总用量 288
-rw-r--r-- 1 owner owner 21 5月 28 18:25 local.txt
-rw-r--r-- 1 owner owner 14238 5月 28 22:16 no-help
drwxr-xr-x 2 owner owner 4096 5月 28 13:23 TXT-dir
ftp> put TXT-dir
local: TXT-dir remote: TXT-dir
TXT-dir : not a plain file.
ftp> mput TXT-dir
mput TXT-dir ? y
bin: not a plain file.
命令行下为何不可??
google后,有如下回答:
Command line FTP is pretty primitive.
You can't recursively send files/folders towards a remote site.
If you want to recreate a directory structure on the remote side the same as the local, you need to manually mkdir each path and use *mput ** to send everything in that directory to the remote side.
Two options to make this easier:
Stop using the primitive FTP command (ncftp is a good alternative)
Use tar to tar up the folders, send the file and extract on the far side.
----------------------
This is not possible with the normal ftp program as mput does not use recursion. You could use ncftp and then call 'mput -r folder'. |
|