Basic FTP Commands
原文:http://www.cs.colostate.edu/helpdocs/ftp.html Common FTP Commands
? to request help or information about theFTP commands ascii to set the mode of file transfer to ASCII
(this isthe default and transmits seven bits per character) binary to set the mode of file transfer to binary
(thebinary mode transmits all eight bits per byte and thusprovides less chance of a transmission error and must beused to transmit files other than ASCII files) bye to exit the FTP environment (same asquit) 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 remotedirectory (same as rm in UNIX) get to copy one file from the remote machineto the local machine get ABC DEF copies file ABC in the current remote directoryto (or on top of) a file named DEF in yourcurrent local directory. get ABC copies file ABC in the current remote directoryto (or on top of) a file with the same name,ABC, in your current local directory.help to request a list of all availableFTP commands lcd to change directory on your local machine(same as UNIX cd) ls to list the names of the files in the currentremote directory mkdir to make a new directory within the currentremote directory mget to copy multiple files from the remotemachine 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 directoryto your current local directory, using the samefilenames. Notice the use of the wild cardcharacter, *.mput to copy multiple files from the localmachine 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 passwordfor a brubeck account
(unless it is to bean anonymous connection).put to copy one file from the local machine tothe remote machinepwd to find out the pathname of the currentdirectory on the remote machinequit to exit the FTP environment (same asbye) rmdir to to remove (delete) a directory in thecurrent remote directory