Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
tim hieu FTP

tim hieu FTP

Ratings: (0)|Views: 227|Likes:
Published by api-3766251

More info:

Published by: api-3766251 on Oct 16, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

T\u00ecm hi\u1ec3u v\u1ec1 FTP
1. Gi\u1edbi thi\u1ec7u

FTP l\u00e0 ch\u1eef vi\u1ebft t\u1eafc c\u1ee7a File Transfer Protocol - Giao th\u1ee9c truy\u1ec1n file.
FTP l\u00e0 m\u1ed9t giao th\u1ee9c truy\u1ec1n file tr\u00ean m\u1ea1ng d\u1ef1a tr\u00ean chu\u1ea9n TCP n\u00ean r\u1ea5t
\u0111\u00e1ng tin c\u1eady!

2. M\u1ed9t s\u1ed1 l\u1ec7nh ph\u1ed5 bi\u1ebfn c\u1ee7a FTP
Sau \u0111\u00e2y l\u00e0 danh s\u00e1ch m\u1ed9t s\u1ed1 l\u1ec7nh th\u01b0\u1eddng d\u00f9ng k\u00e8m theo h\u01b0\u1edbng d\u1eabn

m\u00e0 b\u1ea1n c\u1ea7n bi\u1ebft!
ascii chuy\u1ec3n sang ch\u1ebf \u0111\u1ed9 truy\u1ec1n file theo d\u1ea1ng v\u0103n b\u1ea3n
binary chuy\u1ec3n sang ch\u1ebf \u0111\u1ed9 truy\u1ec1n file theo d\u1ea1ng nh\u1ecb ph\u00e2n
cd [directory] chuy\u1ec3n v\u00e0o th\u01b0 m\u1ee5c directory
cdup chuy\u1ec3n l\u00ean th\u01b0 m\u1ee5c c\u1ea5p tr\u00ean m\u1ed9t c\u1ea5p
close ng\u1eaft k\u1ebft n\u1ed1i v\u1edbi m\u00e1y ch\u1ee7
del [remote-file] x\u00f3a 1 file tr\u00ean m\u00e1y ch\u1ee7
dir [remote-directory|file] li\u1ec7t k\u00ea n\u1ed9i dung c\u1ee7a th\u01b0 m\u1ee5c ho\u1eb7c danh s\u00e1ch

c\u00e1c file tr\u00ean m\u00e1y ch\u1ee7
help [command] cho bi\u1ebft h\u01b0\u1edbng d\u1eabn v\u1ec1 l\u1ec7nh command
lcd [local-directory] \u0111\u1eb7t l\u1ea1i th\u01b0 m\u1ee5c l\u00e0m vi\u1ec7c tr\u00ean client l\u00e0 local-

directory
ls [remote-directory|file] [-la] li\u1ec7t k\u00ea n\u1ed9i dung c\u1ee7a th\u01b0 m\u1ee5c ho\u1eb7c danh
s\u00e1ch c\u00e1c file tr\u00ean m\u00e1y ch\u1ee7; tham s\u1ed1 -la s\u1ebd li\u1ec7t k\u00ea t\u1ea5t c\u1ea3 c\u00f3 k\u00e8m theo

m\u00f4 t\u1ea3 v\u1ec1 quy\u1ec1n
mdelete [remote-files] x\u00f3a nhi\u1ec1u file tr\u00ean m\u00e1y ch\u1ee7
mget [remote-files] download c\u00e1c files tr\u00ean m\u00e1y ch\u1ee7 v\u1ec1
mkdir <directory-name> t\u1ea1o th\u01b0 m\u1ee5c c\u00f3 t\u00ean directory-name

1

mput [local-files] upload c\u00e1c files l\u00ean m\u00e1y ch\u1ee7
open host [port] k\u1ebft n\u1ed1i \u0111\u1ebfn m\u00e1y ch\u1ee7 FTP c\u00f3 hostname l\u00e0 host v\u00e0 \u0111ang
ch\u1ea1y d\u1ecbch v\u1ee5 FTP \u1edf c\u1ed5ng port

put <local-file> [remote-file] upload local-file l\u00ean m\u00e1y ch\u1ee7 v\u1edbi t\u00ean m\u1edbi
l\u00e0 remote-file n\u1ebfu \u0111\u01b0\u1ee3c
pwd cho bi\u1ebft th\u01b0 m\u1ee5c \u0111ang l\u00e0m vi\u1ec7c hi\u1ec7n th\u1eddi
quit tho\u00e1t
recv <remote-file> [local-file] nh\u1eadn remote-file tr\u00ean m\u00e1y ch\u1ee7 v\u00e0 l\u01b0u
tr\u00ean m\u00e1y t\u00ednh v\u1edbi t\u00ean local-file n\u1ebfu \u0111\u01b0\u1ee3c
rename [from] [to] \u0111\u1ed5i t\u00ean file ho\u1eb7c th\u01b0 m\u1ee5c from th\u00e0nh to
rmdir directory-name x\u00f3a th\u01b0 m\u1ee5c c\u00f3 t\u00ean directory-name
send local-file [remote-file] g\u1edfi local-file t\u1eeb m\u00e1y t\u00ednh l\u00ean m\u00e1y ch\u1ee7 v\u1edbi
t\u00ean m\u1edbi l\u00e0 remote-file n\u1ebfu \u0111\u01b0\u1ee3c
status cho bi\u1ebft tr\u1ea1ng th\u00e1i c\u1ee7a phi\u00ean l\u00e0m vi\u1ec7c hi\u1ec7n t\u1ea1i
system cho bi\u1ebft h\u1ec7 \u0111i\u1ec1u h\u00e0nh c\u1ee7a m\u00e1y ch\u1ee7

user user-name [password] [account] login v\u00e0o v\u1edbi t\u00ean l\u00e0 user-name,
m\u1eadt kh\u1ea9u l\u00e0 password, t\u00e0i kho\u1ea3n l\u00e0 account
? g\u1ecdi h\u01b0\u1edbng d\u1eabn

3. C\u00e1c v\u00ed d\u1ee5

\u0110\u1ec3 d\u1ec5 hi\u1ec3u, c\u00e1c b\u1ea1n h\u00e3y xem c\u00e1c v\u00ed d\u1ee5 sau:(t\u00f4i s\u1eed d\u1ee5ng c\u00e1c n\u00e0y \u0111\u1ec3
upload m\u1ea5y file l\u00ean website \u0111\u00f3, kh\u00f4ng c\u1ea7n d\u00f9ng c\u00e1c ch\u01b0\u01a1ng tr\u00ecnh FTP
m\u1ea1nh nh\u01b0 WS_FTP Pro, FTPNet, CuteFTP, AbsoluteFTP, ...!) T\u00f4i l\u01b0u
trang web c\u1ea7n t\u1ea3i l\u00ean server trong c:\website! B\u00e2y gi\u1edd t\u00f4i s\u1ebd t\u1ea3i n\u00f3 l\u00ean!

C:\website>ftp myftpsrv // k\u1ebft n\u1ed1i \u0111\u1ebfn m\u00e1y ch\u1ee7 myftpsrv
Connected to myftpsrv.
User (ftpsrv:(none)): dt
331 User name okay, need password.
Password:
230 User logged in, proceed.
ftp> pwd // cho bi\u1ebft th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i \u0111ang l\u00e0m vi\u1ec7c!
257 "/home/dt" is current directory.
ftp> status // xem tr\u1ea1ng th\u00e1i hi\u1ec7n t\u1ea1i
Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ;
Globbing: On

2

Debugging: Off ; Hash mark printing: Off . // ascii=1
ftp> cd www // chuy\u1ec3n v\u00e0o th\u01b0 m\u1ee5c www
250 Directory changed to /home/dt/www
ftp> put index.html // upload file index.html l\u00ean server
200 PORT Command successful.
150 Opening ASCII mode data connection for index.html.
226 Transfer complete.
ftp: 2095 bytes sent in 0.00Seconds 2095000.00Kbytes/sec.
ftp> mkdir tools // t\u1ea1o th\u01b0 m\u1ee5c /home/dt/www/tools
257 "/home/dt/www/tools" directory created.
ftp> cd tools // chuy\u1ec3n v\u00e0o th\u01b0 m\u1ee5c tools
250 Directory changed to /home/dt/www/tools
ftp> lcd c:\website\tools // thay \u0111\u1ed5i l\u1ea1i local directory =
c:\website\tools
Local directory now C:\website\tools.
ftp> bin // chuy\u1ec3n sang ch\u1ebf \u0111\u1ed9 truy\u1ec1n file nh\u1ecb ph\u00e2n
200 Type set to I.
ftp> mput *.* // upload t\u1ea5t c\u1ea3 c\u00e1c file trong
c:\website\tools l\u00ean server, v\u00e0o /home/www/tools/
mput test.zip? y
200 PORT Command successful.
150 Opening BINARY mode data connection for test.zip.
226 Transfer complete.
ftp: 10168 bytes sent in 0.06Seconds 169.47Kbytes/sec.
mput test.exe? y
200 PORT Command successful.
150 Opening BINARY mode data connection for test.exe.
226 Transfer complete.
ftp: 54625 bytes sent in 0.11Seconds 496.59Kbytes/sec.
ftp> ls -la // li\u1ec7t k\u00ea n\u1ed9i dung c\u1ee7a /home/www/tools
200 PORT Command successful.
150 Opening ASCII mode data connection for /bin/ls.
drwxr--r--

1 dt
group
0 Sep 30 14:13 .
drwxr--r--
1 dt
group
0 Sep 30 14:13 ..
-rwxr--r--
1 dt
group

54625 Sep 30 14:14
test.exe
-rwxr--r--

1 dt
group

10168 Sep 30 14:14
test.zip
226 Transfer complete.
ftp: 247 bytes received in 0.00Seconds 247000.00Kbytes/sec.
ftp> del test.exe // t\u00f4i l\u1ee1 tay upload l\u00ean file test.exe,
b\u00e2y gi\u1edd t\u00f4i c\u1ea7n ph\u1ea3i x\u00f3a n\u00f3
250 DELE command successful.
ftp> cd .. // chuy\u1ec3n l\u00ean th\u01b0 m\u1ee5c c\u1ea5p tr\u00ean
250 Directory changed to /home/dt/www
ftp> mkdir cgi-bin2 // t\u1ea1o th\u01b0 m\u1ee5c m\u1edbi
257 "/home/dt/www/cgi-bin2" directory created.

3

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Dinh Ct liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->