Chương trình FTP client

Một phần của tài liệu Giáo trình quản trị hệ thống webserver và mailserver (nghề quản trị mạng máy tính trung cấp) (Trang 70 - 73)

Mục tiêu: Giới thiệu cho người học các câu lệnh để cấu hình dịch vụ truyển file và môi trường truyền các dòng lệnh

Là chương trình giao tiếpvới FTP Server, hầu hết cáchệ điều hànhđều hỗtrợ FTP Client, trên Linux hoặc Windows để mở kết nối tới FTP Server ta dùng lệnh #ftp <ftp_address>.

Để thiết lập một phiên giao dịch, ta cần phải có địa chỉ IP (hoặc tên máy tính), một tài khoản (username, password). Username mà FTP hỗ trợ sẵn cho người dùngđể mở một giao dịch FTP có tên là anonymousvới passwordrỗng.

Hình 21.41Sử dụng FTP Client. Mộtsố tậplệnhcủa FTP Client:

Tênlệnh Cú pháp Ý nghĩa

? hoặc lệnh help

? [command] Hiển thịgiúp đỡ về[command]. append append local-file [remote-

file]

Ghép một tập tin cục bộ với 1 tập tin trênServer.

ascii ASCII

Chỉ định kiểu truyền file là ascii (đây là kiểu truyền mặc định).

binary Binary

Chỉ định kiểu truyền file là binary(đây là kiểu truyềnmặcđịnh).

Bye Bye Kết thúcftp session.

Cd

cd remote-directory Thay đổi đường dẫn thư mục trên

FTP Server.

delete delete remote-file Xóa file trênFTP Server. Dir dir remote-directory Liệt kê danh sáchtập tin.

Get

get remote-file [local-file] Download tập tin từ FTP Server về máy cục bộ.

Lcd lcd [directory] Thayđổi thư mục trên máycụcbộ. Ls ls [remote-directory] [local-

file]

Liệt kê cáctập tin và thư mục. mdelete mdelete remote-files [ ...] Xóa nhiềutập tin.

Mget mget remote-files [ ...] Downloadnhiều tập tin. Mkdir mkdir directory Tạo thư mục.

Mput mput local-files [ ...] Uploadnhiều tập tin. Open open computer [port] Kếtnốitớiftp server.

prompt Prompt

Tắt cơ chế confirm sau mỗi lần

download tập tin. disconnect Disconnect Hủy kếtnốiFTP.

Pwd Pwd Xem thư mục hiệntại.

Quit Quit Thoát khỏiftp session.

Recv recv remote-file [local-file] Copytập tintừremote vềlocal. Rename rename filename

newfilename

Thayđổi têntập tin. Rmdir rmdir directory Xóa thư mục.

Send send local-file [remote-file] Copytập tintừlocalđếnremote.

User user[account]user-name [password] Chuyểnđổiuser khác.

Ta có thể sử dụng chương trình Internet Explorer để kết nối với FTP Server theo cú pháp sau:

ftp://<username:password>@<Địa chỉFTP_Server>

Hình 21.42Sử dụng IE làm FTP Client.

Dùng Windows commander làm FTP Client để kết nối vào FTP Server, để thực hiện điều này ta mở chương trình Windows Commander | Command | FTP Connect…

Hình 21.43 Sử dụng Windows commanderđể kếtnối vào FTP Server.

Một phần của tài liệu Giáo trình quản trị hệ thống webserver và mailserver (nghề quản trị mạng máy tính trung cấp) (Trang 70 - 73)