0
Tải bản đầy đủ (.doc) (44 trang)

Nhóm các lệnh thao tác với Directory

Một phần của tài liệu BÁO CÁO BÀI TẬP LỚN QUẢN TRỊ MẠNG TÌM HIỂU BỘ LỆNH CỦA DỊCH VỤ FTP (Trang 34 -40 )

Cd

 Ý nghĩa: chuyển thư mục trên FTP server  Cú pháp: Cd remote – directory

 Tham số

Remote – directory: thư mục được chỉ định để thay đổi  Cd .. : trở về thư mục trước đó

Cd … : trở về thư mục gốc của user Ví dụ: Thay đổi thư mục

ftp> cd bitmap

250 CWD successful. "/bitmap" is current directory.

ftp> cd bit

250 CWD successful. "/bitmap/bit" is current directory.

ftp> cd ..

250 CWD successful. "/bitmap" is current directory.

ftp> cd ...

250 CWD successful. "/" is current directory.

ftp>

Lcd

 Ý nghĩa: chuyển thư mục trên FTP client  Cú pháp: Lcd [directory]

directory: thư mục được chỉ định trên máy tính FTP client để thay đổi. Nếu bỏ trống thì thư mục hiện tại đang làm việc sẽ được hiển thị lên.

Cd .. : trở về thư mục trước đó Ví dụ: Thay đổi thư mục

ftp> lcd

Local directory now C:\ftpUp.

ftp> lcd C:\ftpserver

Local directory now C:\FtpServer.

ftp> lcd ..

Local directory now C:\.

ftp>

Ls

 Ý nghĩa: hiển thị danh sách ngắn gọn của các file của thư mục gốc và thư mục con của FTP server

 Cú pháp: Ls [remote - directory]  Tham số

Remote - directory: thư mục được chỉ định trên máy tính FTP server sẽ được hiển thị. Nếu bỏ trống thì thư mục hiện tại đang làm việc sẽ được hiển thị lên.

Ví dụ 1: Hiển thị danh sách toàn bộ các file của thư mục gốc và thư mục con của user

ftp> ls

200 Port command successful

150 Opening data channel for directory list.

bitmap d ebook New Folder picture sd Software 226 Transfer OK

ftp: 53 bytes received in 0.00Seconds 53000.00Kbytes/sec. ftp>

Ví dụ 2: Hiển thị danh sách các file và thư mục bên trong bitmap

ftp> ls bitmap

200 Port command successful

150 Opening data channel for directory list.

bitmap/bit

226 Transfer OK

ftp: 12 bytes received in 0.00Seconds 12000.00Kbytes/sec. ftp> ls

Dir

 Ý nghĩa: hiển thị danh sách các file và thư mục con trên FTp server  Cú pháp: Dir [remote - directory]

 Tham số

Remote - directory: thư mục được chỉ định trên máy tính FTP server muốn hiển thị. Nếu bỏ trống thì thư mục hiện tại đang làm việc sẽ được hiển thị lên.

Ví dụ: Hiển thị toàn bộ các file và thư mục con

ftp> dir

200 Port command successful

150 Opening data channel for directory list.

drwxr-xr-x 1 ftp ftp 0 Apr 10 22:22 bitmap -rw-r--r-- 1 ftp ftp 0 Apr 10 21:05 d drwxr-xr-x 1 ftp ftp 0 Apr 10 17:22 ebook drwxr-xr-x 1 ftp ftp 0 Mar 31 09:21 New Folder drwxr-xr-x 1 ftp ftp 0 Mar 25 22:10 picture -rw-r--r-- 1 ftp ftp 0 Apr 10 18:44 sd

drwxr-xr-x 1 ftp ftp 0 Mar 26 20:02 Software

226 Transfer OK

ftp: 396 bytes received in 0.00Seconds 396000.00Kbytes/sec.

ftp> ls

Mdir

 Ý nghĩa: hiển thị danh sách các file và thư mục con trên FTp server  Cú pháp: Mdir remote – files[…]local-file

Remote - directory: thư mục được chỉ định trên máy tính FTP server muốn hiển thị. Nếu bỏ trống thì thư mục hiện tại đang làm việc sẽ được hiển thị lên.

Ví dụ: Hiển thị toàn bộ các file và thư mục con

ftp> mdir d.txt C://fileDown.txt

output to local-file: C://fileDown.txt? n

ftp> mdir *.txt C://fileDown.txt output to local-file: C://fileDown.txt? y 200 Port command successful

150 Opening data channel for directory list. 226 Transfer OK

ftp>

Mkdir

 Ý nghĩa: tạo mới một thư mục trên FTP server  Cú pháp: Dir [remote - directory]

 Tham số

Remote - directory: thư mục được chỉ định trên máy tính FTP server muốn hiển thị. Nếu bỏ trống thì thư mục hiện tại đang làm việc sẽ được hiển thị lên.

Ví dụ: tạo mới thư mục NewDir

ftp> dir

200 Port command successful

150 Opening data channel for directory list.

drwxr-xr-x 1 ftp ftp 0 Apr 10 22:23 map

226 Transfer OK

ftp: 54 bytes received in 0.00Seconds 54000.00Kbytes/sec.

ftp> mkdir NewDir

257 "/bitmap/bit/NewDir" created successfully

ftp> dir

200 Port command successful

150 Opening data channel for directory list.

drwxr-xr-x 1 ftp ftp 0 Apr 10 22:23 map drwxr-xr-x 1 ftp ftp 0 Apr 11 00:10 NewDir

226 Transfer OK

ftp: 111 bytes received in 0.00Seconds 111000.00Kbytes/sec.

Rmdir

 Ý nghĩa: Xóa thư mục được chỉ định trên FTP server  Cú pháp: Rmdir [remote - directory]

 Tham số

Remote - directory: thư mục được chỉ định trên máy tính FTP server muốn xóa.

Ví dụ: xóa thư mục bitbit

ftp> dir

200 Port command successful

150 Opening data channel for directory list.

drwxr-xr-x 1 ftp ftp 0 Apr 10 22:23 bitbit drwxr-xr-x 1 ftp ftp 0 Apr 10 22:23 map

226 Transfer OK

ftp: 111 bytes received in 0.00Seconds 111000.00Kbytes/sec.

ftp> rmdir bitbit

250 Directory deleted successfully

ftp> dir

200 Port command successful

150 Opening data channel for directory list.

drwxr-xr-x 1 ftp ftp 0 Apr 10 22:23 map

226 Transfer OK

ftp: 54 bytes received in 0.00Seconds 54000.00Kbytes/sec.

ftp>

Pwd

 Ý nghĩa: hiển thị đường dẫn hiện tại của thư mục đang làm việc trên FTP server

 Cú pháp: Pwd  Tham số

ftp> dir

200 Port command successful

150 Opening data channel for directory list.

drwxr-xr-x 1 ftp ftp 0 Apr 11 00:10 bit

226 Transfer OK

ftp: 54 bytes received in 0.00Seconds 54000.00Kbytes/sec.

ftp> pwd

257 "/bitmap" is current directory.

Chương 4. Giới thiệu một số phần mềm FTP client

Một phần của tài liệu BÁO CÁO BÀI TẬP LỚN QUẢN TRỊ MẠNG TÌM HIỂU BỘ LỆNH CỦA DỊCH VỤ FTP (Trang 34 -40 )

×