Aug 24

By default ftp command provided in linux doesn't support recursive upload and verbose mode. If you would like to transfer some of files to new location and its contain some of folder, you should use ncftp command to transfer.

# ncftpput -u <remote_username> -p <remote_password> -F -R <remote_hostname> <remote_directory> <local_file>

  • -R - Recursive
  • -F - Use Passive data connection

ปกติแล้วเวลาย้ายข้อมูลระหว่างลีนุกซ์ผ่าน FTP ถ้าหากเรามีหลายไฟล์ โปรแกรม ftp มาตรฐานที่มากับ linux จะถาม confirm ทุกไฟล์ที่เราต้องการจะย้ายไปที่ไดเรกทอรี่ใหม่ ถ้าหากเราต้องการย้ายข้อมูลจากเซิฟเวอร์หนึ่งไปยังอีกเซิฟเวอร์หนึ่ง อาจจะไม่สะดวกนัก จริงๆมีโปรแกรม ftp อีกตัว ที่สามารถใช้งานได้เหมือนกัน และไม่ต้องคอยตอบคำถาม และยังย้าย directory ได้ด้วย นั่นคือโปรแกรม ncftp

# ncftpput -u <remote_username> -p <remote_password> -F -R
<remote_hostname> <remote_directory> <local_file>

  • -R - ย้ายข้อมูลทั้งหมดในไดเรกทอรรี่นั้นๆ
  • -F - เหมาะสำหรับเครื่องเซิฟเวอร์ที่อาจจะมีปัญหาเกี่ยวกับ Firewall อันนี้เป็นคำสั่งให้ทำงานแบบ Passive Mode

Posted by Warun Kietduriyakul

Defined tags for this entry: , , , , ,
Last modified on 2008-08-24 13:54

0 Trackbacks

  1. No Trackbacks

0 Comments

Display comments as(Linear | Threaded)
  1. No comments

Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications