Ftp usage Overview (linux)-Linux Enterprise Application-Linux server application information. The following is a detailed description. 1. Simple ftp use
Format: ftp [-pinegvtd] [hostname]
-P: enable passive mode (default for pftp)
-I: turn off prompting during mget
-N: inhibit auto-login
-E: disable readline support, if present
-G: disable filename globbing
-V: verbose mode
-T: enable packet tracing [nonfunctional]
-D: enable debugging
Example:
# Ftp 218. 108 .*.*
Connected to 218. 108 .*.*
220 Serv-u ftp Server v6.0 for WinSock ready...
Name (218. 108. *. *: root): anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
Password:
230 Anonymous user logged in.
Remote system type is Windows_NT.
Ftp> bin
200 Type set to I.
Ftp> ls
Ftp> cd/pub
Ftp> cd/incomming
Ftp> get ftp-userguide.tar.gz
Download ftp-userguide.tar.gz to $ HOME.
2. Use ncftpget/ncftpput and nohup to achieve continuous background upload and download
The purpose of nohup is: After you run the download or Upload Command, you can do other important things, or even break the line, and the program can continue to download/upload unfinished tasks.
<1> nohup format:
Nohup command &
Example:
# Nohup/root/test. php &
<2> ncftpget
Format:
Ncftpget-u XX-p XX-R remote-host local-dir remote-path-names...
(For details, refer to the linux help manual ncftpget-h)
Example:
# Ncftpget-u anonymous-R 218. 108. *. * $ HOME/pub/ftp
Where-u User Name
-P Password
-R indicates recursion in the file
<3> ncftpput
Similar to ncftpput, see the linux help manual ncftpput-h.
<4> combination of nohup and ncftpget/ncftpput
# Nohup ncftpget-u anonymous-R 218. 108. *. * $ HOME/pub/ftp &
In this way, you can use this method when you want to download/upload a large file and do not want to watch the machine watch it download/upload the file,
[Note] ncftpget-u user-p passwd-B host dest_dir src_file can also implement this function.
Ncftp may not be available in all linux systems. This article describes how to test ncftp in the slackware operating system.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.