search

The ftp commands under Linux include: 1. ftp command; 2. close command; 3. disconnect command; 4. open command; 5. user command; 6. account command; 7. bye command; 8. quit command; 9. help command; 10. rhelp command; 11. ascii command; 12. binary/bi command; 13. bell command, etc.

What are the ftp commands under linux?

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What are the ftp commands under Linux?

Complete set of Linux FTP commands

1, Preface

Below Gives explanations and examples for all commands.

Explanation: 1. remote-file refers to the remote file, that is, the file on the server

2. local-file refers to the local file, that is, the file on the local machine

2. Login and logout commands

2.1 ftp

$ ftp 192.168.0.2

Format: ftp [host]

Host is ftp host ip, this command is used to log in to the ftp server. After logging in, you will be prompted to enter the account and password. After the account and password are entered correctly, you will log in to the server and enter the FTP subroutine.

2.2 close

FTP> close

End the FTP session with the remote server and return to the command interpreter. There is no exit from the ftp subroutine. You can use the open command to log in again.

2.3 disconnect

FTP> disconnect

Disconnect from the remote server, but still within the FTP subcommand, retaining the ftp prompt. disconnect is an alias for close.

2.4 open

FTP >open Connect to the specified FTP server.

Format: open computer [port]

Description: computer specifies the remote computer to be connected. Computers can be specified by IP address or computer name (DNS or hosts file must be available). If autologin is on (default), ftp will also attempt to automatically log the user into the FTP server. port specifies the port number used to contact the FTP server.

Eg: open 192.168.0.2, then enter the server user and password, and log in again.

2.5 user

FTP >user Specify the user of the remote computer. After logging in to the server, you can change the user.
Format: user username [password] [account]
Description: user-name specifies the user name used to log in to the remote computer. password specifies the password for user-name. If not specified, but required, ftp will prompt for a password.
account Specifies the account to use to log in to the remote computer. If account is not specified, but is required, ftp prompts you for an account.

2.6 account

FTP> account

Provide the supplementary password required to access system resources after successfully logging into the remote system

2.7 bye

FTP> bye (or by) Ends the FTP session with the remote computer and exits ftp.

2.8!

FTP> ! End the FTP session with the remote computer and exit ftp. The function is the same as bye.

2.9 quit

FTP >quit End the FTP session with the remote computer and exit ftp.

Remarks: bye,! The function is basically the same as quit.

3. Help command

3.1 ?

FTP>? Display ftp command description, same as help.
Format:? [command]
Description: command specifies the name of the command that requires instructions. If command is not specified, ftp will display a list of all commands.

3.2 help

FTP >help Displays the ftp command description.
Format: help [command]
Description: command specifies the name of the command that requires instructions. If command is not specified, ftp will display a list of all commands.

3.3 rhelp

FTP >remotehelp Display remote command help.
Format: remotehelp [command]
Description: command specifies the name of the command that requires help. If command is not specified, ftp will display a list of all remote commands.

4. File operation commands

4.1 ascii

FTP> ascii

Set the file transfer type to the default ASCII.

Note: FTP supports two file transfer types, ASCII code and binary code (binary). ASCII should be used when transferring text files.

4.2 binary/bi

FTP> binary (or bi) Set the file transfer type to binary.

4.3 bell

FTP> bell

Toggle the bell to sound after each file transfer command completes. By default, ringtones are turned off.

4.4 cd

FTP> cd

Format: cd remote-directory jumps to the remote-directory directory

4.5 cdup

FTP> cdup
Description: Change the directory on the remote computer and jump to the previous directory.

4.6 lcd

FTP >lcd Change the working directory on the local computer.

By default, the working directory is the directory where ftp is started.

Format: lcd [directory] 

Description: directory specifies the directory on the local computer to be changed. If directory is not specified, the current working directory on the local computer will be displayed.

4.7 dir

FTP> dir displays a list of remote directory files and subdirectories, the same as the ls command.

Format: dir [remote-directory] [local-file]

Description: remote-directory specifies the directory whose list you want to view. If no directory is specified, the current working directory on the remote machine will be used. Local-file specifies the local file in which to store the list. If not specified, the output will be displayed on the screen.

4.8 ls

FTP >ls displays an abbreviated list of files and subdirectories in a remote directory.

Format: ls [remote-directory] [local-file]

Description: remote-directory specifies the directory whose list you want to view. If no directory is specified, the current working directory on the remote machine will be used. local-file specifies the local file in which to store the list. If not specified, the output will be displayed on the screen.

4.9 mdir

FTP >mdir displays a list of remote directory files and subdirectories. Multiple files can be specified using mdir.
Format: mdir remote-files [...] local-file
Description: remote-files specifies the directory to view the list. remote-files must be specified. Please type - to use the current working directory on the remote machine.
local-file Specifies the local file to restore the list. Please type - to display the list on the screen.

4.10 pwd

FTP >pwd displays the current directory on the remote computer.

4.11 size

FTP> size remote-file

Display the size of the remote file

4.12 mkdir

FTP >mkdir creates a remote directory.
Format: mkdir directory
Description: directory specifies the name of the new remote directory.

4.13 rmdir

FTP >rmdir deletes the remote directory.
Format: rmdir directory
Description: directory specifies the name of the remote directory to be deleted.

4.14 rename

FTP >rename Rename remote files.
Format: rename filename newfilename
Description: filename specifies the file to be renamed. newfilename specifies a new file name.

4.15 mls

FTP >mls Displays an abbreviated list of files and subdirectories in a remote directory.

Format: mls remote-files [...] local-file
Description: remote-files specifies the files to view the list. remote-files must be specified;
Please type - to use the current working directory on the remote computer.
local-file Specifies the local file to store the list. Please type - to display the list on the screen.

4.16 chmod

FTP> chmod 755 remote_file

Description: Change the RWX attribute of the file on the remote directory

4.17 modtime

FTP >modtime remote-file displays the last modification time of the file on the remote server

Format: mput remote-files

Description: remote-files files on the remote computer

4.18 append

FTP>append local-file

Append a local file to a file on the remote computer using the current file type settings

Format: append local-file [remote-file ]

If remote-file is omitted, the local file name will be used as the remote file name.

4.19 send

FTP >send Copies local files to a remote computer using the current file transfer type. Send is the same as put.
Format: send local-file [remote-file]
Description: local-file specifies the local file to be copied. remote-file specifies the name to use on the remote computer. If not specified, the file will be named local-file.

4.20 put

 FTP >put Copies local files to the remote computer using the current file transfer type.
Format: put local-file [remote-file]
Description: local-file specifies the local file to be copied.
 remote-file specifies the name to be used on the remote computer. If not specified, the file will be named local-file.

4.21 mput

FTP >mput Multiple file transfer, copies local files to a remote computer using the current file transfer type.
Format: mput local-files [...]
Description: local-files specifies the local files to be copied to the remote computer

4.22 get

FTP> get uses the current The file conversion type copies remote files to the local computer.

Format: get remote-file [local-file]

Description: remote-file specifies the remote file to be copied.

Local-file Specifies the name to use on the local computer. If not specified, the file will be named remote-file.

4.23 mget

FTP >mget copies a remote file to the local computer using the current file transfer type.
Format: mget remote-files [...]
Description: remote-files specifies the remote files to be copied to the local computer.

4.24 reget

4.25 recv

FTP >recv Copies remote files to the local computer using the current file transfer type. Recv is the same as get.
Format: recv remote-file [local-file]
Description: remote-file specifies the remote file to be copied.
 local-file specifies the name to be used on the local computer. If not specified, the file will be named remote-file.

4.26 newer

  FTP >newer remote-filelocal-file Gets the file of the remote server, if the file is newer than the local file

Format: mput remote-file local- file [ ...]

4.27 delete

FTP> delete deletes files on the remote computer.

Format: delete remote-file

Description: remote-file specifies the file to be deleted.

4.28 mdelete

FTP >mdelete Delete files on the remote computer.
Format: mdelete remote-files [...]
Description: remote-files specifies the remote files to be deleted.

4.29 umask

Display the umask value of the remote server

5. File mode command

5.1 case

FTP> case

Trigger remote file name case change function

5.2 ccc

FTP> ccc

5.3 clear

FTP>clear

5.4 cprotect

5.5 form

Set file transfer format

5.6 glob

FTP > ;glob switches filename combinations. The

combination allows the use of wildcard characters (* and ?) in internal file or path names. By default, combining is on.

5.7 hash

FTP >hash Toggles the printing of a digital signature (#) for each data block that has been transferred.

The size of the data block is 2048 bytes. By default, hash symbol printing is turned off.

5.8 idle

5.9 image

5.10 mode

Set the file transfer model, Linux only supports stream mode (stream)

5.11 nmap

Set or cancel the file name mapping mechanism

5.12 nlist

5.13 ntrans

Set or cancel the file name character transformation mechanism

5.14 passive

5.15 private

5.16 prompt

FTP >prompt Switch prompt. If you turn off the prompt when mget and mput transfer all files, Ftp will prompt during multiple file transfers to allow you to selectively retrieve or store files. By default, prompts are on.

5.17 protect

5.18 proxy

Execute an ftp command on the auxiliary control connection

5.19 sendport

Use PORT triggered for each data connection

5.20 quote

FTP >quote Send parameters verbatim to the remote FTP server. A single FTP reply code will be returned.
Quote is the same as literal.
Format: quote argument [...]
Description: argument specifies the parameters to be sent to the FTP server.

5.21 reset

Clear the response queue

5.22 restart

5.23 runique

5.24 safe

Transfer the file Set to security protection mode

5.25 site

5.26 struct

Set the file transfer structure

5.27 sunique

Trigger the remote unique host file Storage function

5.28 tenex

Set tenex file transfer type

5.29 type

FTP >type Set or display the file transfer type.
Format: type [type-name]
Description: type-name specifies the file transfer type. The default setting is ascii. If type-name is not specified, the current type will be displayed.

6. Other commands

6.1 $

FTP> $ macro_name

Run the macro, macro_name is the name of the macro

6.2 macdef

Define macro function

6.3 cr

Trigger carriage return and line feed function

6.4 debug

FTP> debug switches debugging.

When debugging is turned on, every command sent to the remote computer is printed, preceded by the string ">". By default, debugging is turned off.

6.5 trace

FTP >trace switches packet tracing. Trace shows the route of each packet when running the ftp command.

6.6 status

FTP >status Displays the current status of FTP connections and switching.

6.7 rstatus

Display the status of the remote server

6.8 system

Display the remote host type, mainly version and kernel information

6.9 verbose

FTP >verbose Switch verbose mode. If on, all ftp responses will be displayed. After the file transfer is completed, statistical information related to transfer efficiency will be displayed at the same time. By default, verbose is on.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What are the ftp commands under linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The 5 Core Components of the Linux Operating SystemThe 5 Core Components of the Linux Operating SystemMay 08, 2025 am 12:08 AM

The five core components of the Linux operating system are: 1. Kernel, 2. System libraries, 3. System tools, 4. System services, 5. File system. These components work together to ensure the stable and efficient operation of the system, and together form a powerful and flexible operating system.

The 5 Essential Elements of Linux: ExplainedThe 5 Essential Elements of Linux: ExplainedMay 07, 2025 am 12:14 AM

The five core elements of Linux are: 1. Kernel, 2. Command line interface, 3. File system, 4. Package management, 5. Community and open source. Together, these elements define the nature and functionality of Linux.

Linux Operations: Security and User ManagementLinux Operations: Security and User ManagementMay 06, 2025 am 12:04 AM

Linux user management and security can be achieved through the following steps: 1. Create users and groups, using commands such as sudouseradd-m-gdevelopers-s/bin/bashjohn. 2. Bulkly create users and set password policies, using the for loop and chpasswd commands. 3. Check and fix common errors, home directory and shell settings. 4. Implement best practices such as strong cryptographic policies, regular audits and the principle of minimum authority. 5. Optimize performance, use sudo and adjust PAM module configuration. Through these methods, users can be effectively managed and system security can be improved.

Linux Operations: File System, Processes, and MoreLinux Operations: File System, Processes, and MoreMay 05, 2025 am 12:16 AM

The core operations of Linux file system and process management include file system management and process control. 1) File system operations include creating, deleting, copying and moving files or directories, using commands such as mkdir, rmdir, cp and mv. 2) Process management involves starting, monitoring and killing processes, using commands such as ./my_script.sh&, top and kill.

Linux Operations: Shell Scripting and AutomationLinux Operations: Shell Scripting and AutomationMay 04, 2025 am 12:15 AM

Shell scripts are powerful tools for automated execution of commands in Linux systems. 1) The shell script executes commands line by line through the interpreter to process variable substitution and conditional judgment. 2) The basic usage includes backup operations, such as using the tar command to back up the directory. 3) Advanced usage involves the use of functions and case statements to manage services. 4) Debugging skills include using set-x to enable debugging mode and set-e to exit when the command fails. 5) Performance optimization is recommended to avoid subshells, use arrays and optimization loops.

Linux Operations: Understanding the Core FunctionalityLinux Operations: Understanding the Core FunctionalityMay 03, 2025 am 12:09 AM

Linux is a Unix-based multi-user, multi-tasking operating system that emphasizes simplicity, modularity and openness. Its core functions include: file system: organized in a tree structure, supports multiple file systems such as ext4, XFS, Btrfs, and use df-T to view file system types. Process management: View the process through the ps command, manage the process using PID, involving priority settings and signal processing. Network configuration: Flexible setting of IP addresses and managing network services, and use sudoipaddradd to configure IP. These features are applied in real-life operations through basic commands and advanced script automation, improving efficiency and reducing errors.

Linux: Entering and Exiting Maintenance ModeLinux: Entering and Exiting Maintenance ModeMay 02, 2025 am 12:01 AM

The methods to enter Linux maintenance mode include: 1. Edit the GRUB configuration file, add "single" or "1" parameters and update the GRUB configuration; 2. Edit the startup parameters in the GRUB menu, add "single" or "1". Exit maintenance mode only requires restarting the system. With these steps, you can quickly enter maintenance mode when needed and exit safely, ensuring system stability and security.

Understanding Linux: The Core Components DefinedUnderstanding Linux: The Core Components DefinedMay 01, 2025 am 12:19 AM

The core components of Linux include kernel, shell, file system, process management and memory management. 1) Kernel management system resources, 2) shell provides user interaction interface, 3) file system supports multiple formats, 4) Process management is implemented through system calls such as fork, and 5) memory management uses virtual memory technology.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool