نحوه انتقال فایل از طریق ftp در لینوکس

نحوه انتقال فایل از طریق ftp در لینوکس

نحوه انتقال فایل از طریق ftp در لینوکس :

در مرحله اول،وارد command line سرور مجازی خود شوید.

برای ویندوز، command prompt و برای لینوکس ، shell در دسترس میباشد.

بسیار خب با username and password اکانت ftp خود در سرور مجازی مقصد، به سرور مجازی قبلی متصل شوید.

سپس با استفاده از دستو زیر مسیر دانلود فایل در سرور مجازی مقصد که مال شما میباشد را مشخص کنید.

[su_code]

lcd /path

[/su_code]

همینطور میتوانید با استفاده از دستور زیر به فولدر و یا دایرکتوری که مد نظر دارید، تغییر مکان دهید :

[su_code]

cd /path

[/su_code]

سپس با وارد کردن دستور زیر ، محتوای فولدر و یا دایرکتوری را مشاهده کنید :

[su_code]

ls

[/su_code]

 

با وارد کردن دستور زیر میتوانید فایل را روی سرور مجازی مقصد download کنید :

[su_code]

mget /path/yourfile

[/su_code]

 

از جمله دستورات عمومی و پرکاربرد در FTP به شکل زیر میباشد :

[su_code]

* open – opens a connection to the specified machine. *

cd – change directory on the remote machine. *

lcd – change directory on the local machine. *

pwd – print working directory on the remote machine. *

ls – short directory listing on the remote machine. *

lls – short directory listing on the remote machine. *

dir – long directory listing on the local machine. *

ascii – set ascii transfer type (for text files). *

binary (or image) – set binary transfer type (for binary data, executable files, gzipped files etc.). *

get – copy file from the remote machine to the local machine, or append “-” after the filename to display the contents of a remote file on your screen (e.g. the command get 00README – will display the 00README file of the current directory to your local screen). *

put – copy file from the local machine to the remote machine. *

mget – as for get, but copies multiple files. *

mput – as for put, but copies multiple files. *

close – disconnects from the remote machine. *

quit – terminate FTP session and exit

[/su_code]