- Список FTP-команд для командной строки Windows
- Команды FTP для командной строки Windows
- FTP команды для Windows
- FTP параметры командной строки для Windows
- ftp ftp
- Синтаксис Syntax
- Параметры Parameters
- Комментарии Remarks
- Basic FTP Commands
- What is FTP?
- Getting Started
- Anonymous FTP
- Common FTP Commands
- Further Information
- Example Sessions
Список FTP-команд для командной строки Windows
FTP команды предназначены для обмена файлами между компьютерами в частной сети или через интернет.
Существует три способа, с помощью которых можно получить доступ к FTP :
- FTP-клиенты командной строки.
- Браузер.
- Графические FTP-клиенты .
Первые два — это простые средства, которые позволяют использовать браузер или клиентское приложение FTP — (например, FTP Voyager ) для подключения к FTP-серверу для обмена файлами. Используя интерфейс командной строки, нужно ввести набор команд для отправки или получения файлов с других компьютеров.
Операционные системы Windows , Macintosh X и Linux имеют встроенные клиенты командной строки, которые могут быть использованы для установления FTP-соединения . Чтобы инициировать соединение в Windows , введите в CMD команды FTP и нажмите Enter .
Команды FTP для командной строки Windows
Команда | Описание |
! | Эта команда служит для перехода между операционной системой и FTP. Для возврата из операционной системы к командной строке FTP используется команда exit. |
? | Отображение справки для команды. |
append | Добавление текста в локальный файл. |
ascii | Переключение в ASCII режим передачи данных. |
bell | Включает/отключает режим подачи звукового сигнала. |
binary | Установка режима передачи двоичных файлов. |
bye | Выход из FTP. |
cd | Смена текущего каталога. |
close | Выход из FTP. |
delete | Удаление файла. |
debug | Включает/отключает отладочный режим. |
dir | Выводит список файлов. |
dir -C = выводит файлы в расширенном формате.
dir -1 = выводит список файлов в алфавитном порядке.
dir -r = выводит список каталогов в обратном алфавитном порядке.
dir -R = выводит список всех файлов в текущем каталоге и подкаталогах.
dir -S = выводит список файлов в алфавитном порядке.
FTP команды для Windows
FTP параметры для командной строки Windows
Параметры CMD используются для изменения работы команд FTP . Параметр командной строки обычно следует за основной командой FTP через пробел. Вот список часто используемых параметров командной строки FTP для Windows® :
Параметр командной строки | Описание |
-v | Отключение вывода на экран ответов с удаленного сервера. |
-n | Отключение автоматического входа при начальном подключении. |
-i | Отключение интерактивных запросов при передаче нескольких |
файлов.
будут выполняться автоматически при запуске FTP. Пробелы в этом параметре не допускаются. Используйте этот параметр вместо перенаправления (>).
FTP параметры командной строки для Windows
Консольный FTP-клиент , встроенный в Windows и Mac OS X — это надежный инструмент для тестирования, поиска и устранения неисправностей. Изучение приведенных выше cmd ftp команд поможет вам обмениваться файлами между компьютерами без установки дополнительного программного обеспечения.
FTP не является надежным способом обмена конфиденциальной информацией. Из-за ограничений этого протокола организации, как правило, используют для передачи файлов протоколы FTPS и SFTP . Технология управляемой передачи файлов ( MFT ) поддерживает эти протоколы безопасности.
ftp ftp
Область применения: Windows Server (половина ежегодного канала), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Передает файлы на компьютер, на котором запущена служба протокол FTP (FTP), и с него. Transfers files to and from a computer running a File Transfer Protocol (ftp) server service. Эту команду можно использовать интерактивно или в пакетном режиме, обрабатывая текстовые файлы ASCII. This command can be used interactively or in batch mode by processing ASCII text files.
Синтаксис Syntax
Параметры Parameters
Параметр Parameter | Описание Description |
---|---|
-v -v | Отключает отображение ответов на удаленные серверы. Suppresses display of remote server responses. |
-d -d | Включает отладку, отображая все команды, передаваемые между FTP-клиентом и FTP-сервером. Enables debugging, displaying all commands passed between the FTP client and FTP server. |
-i -i | Отключает Интерактивные запросы во время передачи нескольких файлов. Disables interactive prompting during multiple file transfers. |
-n -n | Подавляет автоматическое имя входа при начальном подключении. Suppresses auto-login upon initial connection. |
-g -g | Отключает имя файла глобализации. Disables file name globbing. Стандартная маска позволяет использовать звездочку (*) и вопросительный знак (?) в качестве подстановочных знаков в именах локальных файлов и путей. Glob permits the use of the asterisk (*) and question mark (?) as wildcard characters in local file and path names. |
#d0 -s: | Указывает текстовый файл, содержащий команды FTP . Specifies a text file that contains ftp commands. Эти команды выполняются автоматически после запуска FTP . These commands run automatically after ftp starts. Этот параметр не допускает пробелов. This parameter allows no spaces. Используйте этот параметр вместо перенаправления ( ). Use this parameter instead of redirection ( ). Примечание. В операционных системах Windows 8 и Windows Server 2012 или более поздней версии текстовый файл должен быть написан в кодировке UTF-8. Note: In Windows 8 and Windows Server 2012 or later operating systems, the text file must be written in UTF-8. |
-a -a | Указывает, что при привязке подключения к данным FTP можно использовать любой локальный интерфейс. Specifies that any local interface can be used when binding the ftp data connection. |
-A -A | Выполняет вход на FTP-сервер как анонимный. Logs onto the ftp server as anonymous. |
x -x: | Переопределяет размер SO_SNDBUF по умолчанию 8192. Overrides the default SO_SNDBUF size of 8192. |
Cерверный -r: | Переопределяет размер SO_RCVBUF по умолчанию 8192. Overrides the default SO_RCVBUF size of 8192. |
& -b: | Переопределяет число асинхронных буферов по умолчанию, равное 3. Overrides the default async buffer count of 3. |
Белая -w: | Задает размер буфера перемещения. Specifies the size of the transfer buffer. Размер окна по умолчанию составляет 4096 байт. The default window size is 4096 bytes. |
Указывает имя компьютера, IP-адрес или IPv6-адрес сервера FTP, к которому осуществляется подключение. Specifies the computer name, IP address, or IPv6 address of the ftp server to which to connect. Имя узла или адрес, если он указан, должен быть последним параметром в строке. The host name or address, if specified, must be the last parameter on the line. | |
-? -? | Отображение справки в командной строке. Displays help at the command prompt. |
Комментарии Remarks
Параметры командной строки FTP чувствительны к регистру. The ftp command-line parameters are case-sensitive.
Эта команда доступна, только если протокол Internet Protocol (TCP/IP) установлен в качестве компонента в свойствах сетевого адаптера в окне Сетевые подключения. This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.
Команду FTP можно использовать в интерактивном режиме. The ftp command can be used interactively. После запуска FTP создает подсреду, в которой можно использовать команды FTP . After it is started, ftp creates a sub-environment in which you can use ftp commands. Вы можете вернуться в командную строку, введя команду Quit . You can return to the command prompt by typing the quit command. При запуске вспомогательной среды FTP она указывается в ftp > командной строке. When the ftp sub-environment is running, it is indicated by the ftp > command prompt. Дополнительные сведения см. в разделе команды FTP . For more information, see the ftp commands.
При установке протокола IPv6 команда FTP поддерживает использование IPv6. The ftp command supports the use of IPv6 when the IPv6 protocol is installed.
Basic FTP Commands
What is FTP?
The FTP ( F ile T ransfer P rotocol) utility program is commonly used for copying files to and from other computers. These computers may be at the same site or at different sites thousands of miles apart. FTP is a general protocol that works on UNIX systems as well as a variety of other (non-UNIX) systems.
For the purposes of this Web page, the local machine refers to the machine you are initially logged into, the one on which you type the ftp command. The remote machine is the other one, the one that is the argument of the ftp command.
A user interface for the standard File Transfer Protocol for ARPANET, FTP acts as an interpreter on the remote machine. The user may type a number of UNIX-like commands under this interpreter to perform desired actions on the remote machine.
Most operating systems and communication programs now include some form of an FTP utility program, but the commands differ slightly between them. The following explanations and alphabetical list of commands refers to the common FTP utility program as provided on a UNIX machine. Check the documentation for your own machine to determine the comparable commands.
Most computers today include a windows-based type FTP program that is more PC-oriented and does not require full knowledge of these commands. You can also perform FTP through a browser. For example, bring up Internet Explorer and type in
            ftp:// yourLoginName@IPaddress
instead of a normal web page URL.
The FTP site of the Computer Science department at CSU requires the user to use sftp , the secure version of FTP. Just type sftp instead of ftp , when you are using FTP in a terminal window.
Getting Started
            ftp machinename
where machinename is the full machine name of the remote machine, e.g., purcell.cs.colostate.edu . If the name of the machine is unknown, you may type
            ftp machinennumber
where machinennumber is the net address of the remote machine, e.g., 129.82.45.181 . In either case, this command is similar to logging onto the remote machine. If the remote machine has been reached successfully, FTP responds by asking for a loginname and password .
When you enter your own loginname and password for the remote machine, it returns the prompt
            ftp>
and permits you access to your own home directory on the remote machine. You should be able to move around in your own directory and to copy files to and from your local machine using the FTP interface commands given on the following page.
Anonymous FTP
When the remote machine asks for your loginname , you should type in the word anonymous . Instead of a password , you should enter your own electronic mail address. This allows the remote site to keep records of the anonymous FTP requests.
Once you have been logged in, you are in the anonymous directory for the remote machine. This usually contains a number of public files and directories. Again you should be able to move around in these directories. However, you are only able to copy the files from the remote machine to your own local machine; you are not able to write on the remote machine or to delete any files there.
Common FTP Commands
? | to request help or information about the FTP commands | |
---|---|---|
ascii | to set the mode of file transfer to ASCII (this is the default and transmits seven bits per character) | |
binary | to set the mode of file transfer to binary (the binary mode transmits all eight bits per byte and thus provides less chance of a transmission error and must be used to transmit files other than ASCII files) | |
bye | to exit the FTP environment (same as quit ) | |
cd | to change directory on the remote machine | |
close | to terminate a connection with another computer | |
  | close brubeck | closes the current FTP connection with brubeck , but still leaves you within the FTP environment. |
delete | to delete (remove) a file in the current remote directory (same as rm in UNIX) | |
get | to copy one file from the remote machine to the local machine | |
  | get ABC DEF | copies file ABC in the current remote directory to (or on top of) a file named DEF in your current local directory. |
  | get ABC | copies file ABC in the current remote directory to (or on top of) a file with the same name, ABC , in your current local directory. |
help | to request a list of all available FTP commands | |
lcd | to change directory on your local machine (same as UNIX cd ) | |
ls | to list the names of the files in the current remote directory | |
mkdir | to make a new directory within the current remote directory | |
mget | to copy multiple files from the remote machine to the local machine; you are prompted for a y / n answer before transferring each file | |
  | mget * | copies all the files in the current remote directory to your current local directory, using the same filenames. Notice the use of the wild card character, * . |
mput | to copy multiple files from the local machine to the remote machine; you are prompted for a y / n answer before transferring each file | |
open | to open a connection with another computer | |
  | open brubeck | opens a new FTP connection with brubeck ; you must enter a username and password for a brubeck account (unless it is to be an anonymous connection). |
put | to copy one file from the local machine to the remote machine | |
pwd | to find out the pathname of the current directory on the remote machine | |
quit | to exit the FTP environment (same as bye ) | |
rmdir | to to remove (delete) a directory in the current remote directory Further InformationExample SessionsExamples of two FTP sessions are given on the next two pages. These show the type of interaction you may expect when using the ftp utility. |