


What are the ftp commands under linux?
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.
#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!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

To tune MySQL into a Chinese interface, it can be implemented through MySQLWorkbench or command line tools. 1) In MySQLWorkbench, open "Preferences", select the "Appearance" tab, and then select "Chinese(Simplified)" in the "Language" drop-down menu, and restart. 2) When using command line tools, set the operating system locale variables, such as using "exportLANG=zh_CN.UTF-8" on Linux or macOS, and then run the mysql client.

Linux and Windows have their own advantages and disadvantages in CPU and memory usage: 1) Linux uses time slice-based scheduling algorithms to ensure fairness and efficiency; Windows uses priority scheduling, which may cause low-priority processes to wait. 2) Linux manages memory through paging and switching mechanisms to reduce fragmentation; Windows tends to pre-allocate and dynamic adjustment, and efficiency may fluctuate.

Linux's cost of ownership is usually lower than Windows. 1) Linux does not require license fees, saving a lot of costs, while Windows requires purchasing a license. 2) Linux has low hardware requirements and can extend the service life of the device. 3) The Linux community provides free support to reduce maintenance costs. 4) Linux is highly secure and reduces productivity losses. 5) The Linux learning curve is steep, but Windows is easier to use. The choice should be based on specific needs and budget.

LinuxoftenoutperformsWindowsinI/Operformanceduetoitscustomizablekernelandfilesystems,whileWindowsoffersmoreuniformperformanceacrosshardware.1)LinuxexcelswithcustomizableI/OschedulerslikeCFQandDeadline,enhancingperformanceinhigh-throughputapplications

The key to installing dual systems in Linux and Windows is partitioning and boot settings. 1. Preparation includes backing up data and compressing existing partitions to make space; 2. Use Ventoy or Rufus to make Linux boot USB disk, recommend Ubuntu; 3. Select "Coexist with other systems" or manually partition during installation (/at least 20GB, /home remaining space, swap optional); 4. Check the installation of third-party drivers to avoid hardware problems; 5. If you do not enter the Grub boot menu after installation, you can use boot-repair to repair the boot or adjust the BIOS startup sequence. As long as the steps are clear and the operation is done properly, the whole process is not complicated.

The key to enabling EPEL repository is to select the correct installation method according to the system version. First, confirm the system type and version, and use the command cat/etc/os-release to obtain information; second, enable EPEL through dnfinstallepel-release on CentOS/RockyLinux, and the 8 and 9 version commands are the same; third, you need to manually download the corresponding version of the .repo file and install it on RHEL; fourth, you can re-import the GPG key when encountering problems. Note that the old version may not be supported, and you can also consider enabling epel-next to obtain the test package. After completing the above steps, use dnfrepolist to verify that the EPEL repository is successfully added.

Linux usually performs better in web server performance, mainly due to its advantages in kernel optimization, resource management and open source ecosystem. 1) After years of optimization of the Linux kernel, mechanisms such as epoll and kqueue make it more efficient in handling high concurrent requests. 2) Linux provides fine-grained resource management tools such as cgroups. 3) The open source community continuously optimizes Linux performance, and many high-performance web servers such as Nginx are developed on Linux. By contrast, Windows performs well when handling ASP.NET applications and provides better development tools and commercial support.

Newbie users should first clarify their usage requirements when choosing a Linux distribution. 1. Choose Ubuntu or LinuxMint for daily use; programming and development are suitable for Manjaro or Fedora; use Lubuntu and other lightweight systems for old devices; recommend CentOSStream or Debian to learn the underlying principles. 2. Stability is preferred for UbuntuLTS or Debian; you can choose Arch or Manjaro to pursue new features. 3. In terms of community support, Ubuntu and LinuxMint are rich in resources, and Arch documents are technically oriented. 4. In terms of installation difficulty, Ubuntu and LinuxMint are relatively simple, and Arch is suitable for those with basic needs. It is recommended to try it first and then decide.
