The ftp utility prompts the user for a command after the user is connected to a host. Table A.2 lists some useful ftp commands.
Useful ftp Commands | |
---|---|
Command | Meaning |
ascii | Set the file transfer type to ASCII (use when transferring HTML files between Linux and Windows systems) |
binary | Set the file transfer type to binary |
bye | End the FTP session and close the ftp utility |
cd remote-directory | Change the working directory on the remote machine |
cdup | Change to the parent directory of the remote directory |
delete remote-file | Delete a remote file |
get remote-file | Retrieve a remote file |
help command | Display help for the command; if no command is used, show help for all commands |
lcd directory | Change the directory on the local machine |
ls remote-directory | Display the contents of a remote directory |
mget remote-files | Get remote files based on a wildcard expression |
mkdir dir-name | Create (make) a directory on the remote machine |
mput local-files | Upload local files based on a wildcard specification |
open host | Open an FTP connection to the specified host |
put local-file | Upload a file to the remote machine |
pwd | Display the current directory on the remote machine |
system | Display the operating system running on the remote machine |
user username [password] | Identify yourself to the remote FTP server if you need to change to a new user ID |