|
การโอนย้ายแฟ้มข้อมูล
FTP ด้วยโปรแกรม FTP For DOS |

| c:\> ftp emisc.moe.go.th |
| $ ftp emisc.moe.go.th Connected to emisc.moe.go.th. 220 emisc.moe.go.th FTP server (Digital UNIX Version 5.60) ready. Name (emisc.moe.go.th:bumrung): std1 331 Password required for std1. Password: 230 User std1 logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> |
คำสั่งขอดูชื่อแฟ้ม
สิ่งที่จำเป็นต้องทราบก่อนการโอนย้ายแฟ้มจากโฮสต์
คือชื่อแฟ้มและไดเร็คทอรี่
ของโฮสต์ โปรแกรม FTP มีคำสั่ง
ls ใช้แสดงรายชื่อในโฮสต์
ดังตัวอย่าง
| ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list .cshrc |
| ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls total 34 -rwxr-xr-x 1 std1 emisc 1499 Jul 25 1995 .cshrc -rwxr-xr-x 1 std1 emisc 1639 Jul 25 1995 .login -rwxr-xr-x 1 std1 emisc 1580 Jul 25 1995 .profile drwxr-xr-x 2 std1 emisc 512 Dec 7 1995 bin drwx------ 2 std1 emisc 512 Aug 13 09:07 mail drwxr-xr-x 2 std1 emisc 512 Jul 10 14:56 mars -rw-r--r-- 1 std1 emisc 19 Jul 15 11:45 test.txt 226 Transfer complete. ftp> |
คำสั่งเปลี่ยนไดเร็คทอรี่
หากต้องการเปลี่ยนไดเร็คทอรี่อื่น
ให้ใช้คำสั่ง cd
เพื่อย้ายไปยังไดเร็คทอรี่
ที่ต้องการ ดังตัวอย่างเช่น
| ftp> pwd 257 "/disk14/std1" is current directory. ftp> cd mail 250 CWD command successful. ftp> pwd 257 "/disk14/std1/mail" is current directory. ftp> cd .. 250 CWD command successful. ftp> pwd 257 "/disk14/std1" is current directory. ftp> |
| get ชื่อแฟ้มต้นทาง [ชื่อแฟ้มปลายทาง( จะไม่กำหนดก็ได้)] |
| ftp> pwd 257 "/disk14/std1" is current directory. ftp> cd .. 250 CWD command successful. ftp> pwd 257 "/disk14" is current directory. ftp> cd pub 250 CWD command successful. ftp> pwd 257 "/disk14/pub" is current directory. ftp> dir -rw-r--r-- 1 root system 1920 Aug 14 16:39 ll3.exe -rw-r--r-- 1 root system 1182 Aug 14 16:42 login.bat -rw-r--r-- 1 root system 1108490 Aug 14 16:40 r32_4b1b.exe -rw-r--r-- 1 root system 2132 Aug 14 16:42 school11.txt 226 Transfer complete. ftp> get login.bat 200 PORT command successful. 150 Opening BINARY mode data connection for login.bat (1182 bytes). 226 Transfer complete. 1182 bytes received in 0.00098 seconds (1.2e+03 Kbytes/s) ftp> |
| ftp> pwd 257 "/disk14/pub" is current directory. ftp> mget l* mget ll3.exe? y 200 PORT command successful. 150 Opening BINARY mode data connection for ll3.exe (1920 bytes). 226 Transfer complete. 1920 bytes received in 0.033 seconds (57 Kbytes/s) mget login.bat? y 200 PORT command successful. 150 Opening BINARY mode data connection for login.bat (1182 bytes). 226 Transfer complete. 1182 bytes received in 0 seconds (1.2 Kbytes/s) ftp> |
คำสั่งโอนแฟ้มข้อมูลไปยังโฮสต์
เมื่อต้องการโอนแฟ้มข้อมูลจากเครื่อง
PC ไปยังโฮสต์ ให้ใช้คำสั่ง put
หรือต้องการโอนแฟ้มข้อมูลหลายๆ
แฟ้มพร้อมกันให้ใช้คำสั่ง
mput ได้ ซึ่งคำสั่ง put
มีรูปแบบดังนี้
| put ชื่อแฟ้มต้นทาง [ชื่อแฟ้มปลายทาง( จะไม่กำหนดก็ได้)] |
คำสั่งขอความช่วยเหลือ
โปรแกรม FTP
มีคำสั่งภายในอยู่เป็นจำนวนมาก
หากต้องการขอดูคำสั่งให้พิมพ์
help หรือ ?
เพื่ออ่านรายละเอียดวิธีการใช้และคำสั่งต่างๆ
ของโปรแกรม
คำสั่งจบการทำงาน โปรแกรม FTP
หากเสร็จสิ้นการโอนย้ายแฟ้มแล้ว
ให้ใช้คำสั่ง quit หรือ bye
เพื่อออกจากโปรแกรม FTP
3.
ข้อคำนึงถึงเมื่อใช้ โปรแกรม
FTP
บริการโอนย้ายแฟ้มข้อมูลนับเป็นบริการที่ได้รับความนิยมอย่างมาก
และปัจจุบันมีศูนย์บริการโอนย้ายข้อมูลอยู่มากมาย
ศูนย์บริการมักจะจำกัดจำนวนผู้เข้าขอใช้บริการ
การขอบริการโอนย้ายแฟ้มข้อมูล
จึงมักต้องเลือกช่วงเวลาที่เหมาะสมด้วย
ศูนย์บริการบางแห่งอาจไม่ควบคุมการโอนย้ายข้อมูลมากนัก
แต่บางแห่งก็มีกฏเกณฑ์ที่บอกให้ผู้ใช้ทราบก่อนเข้าไปถ่ายข้อมูลมา
ศูนย์บริการหลายแห่งเปิดให้เข้าไปถ่ายโอนข้อมูลได้อิสระ
แต่มักใช้ที่อยู่ E-Mail
ของผู้ใช้บริการเป็นรหัสผ่าน
และบันทึกคำสั่งทุกคำที่ใช้งานอยู่เพื่อไว้ตรวจสอบภายหลัง
ลำดับที่ # [an error occurred while processing this directive]
Copyright
&: 2001 Ministry of Education, THAILAND
โดยนายบำรุง เฉียบแหลม
นักวิชาการคอมพิวเตอร์
กลุ่มพัฒนาระบบงานคอมพิวเตอร์
ศูนย์สารสนเทศ สป. ศธ.
โทร. 281-9809 , 628-5643 , 628-5644 โทรสาร
281-8218
ติดต่อผู้ดูแลระบบ : bumrung@emisc.moe.go.th
