Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
ftp [options] [hostname]
Transfer files to and from remote network site hostname. ftp prompts the user for a command. The commands are listed after the options. Some of the commands are toggles, meaning they turn on a feature when it is off and vice versa. Note that versions may have different options.
Disable filename globbing.
Turn off interactive prompting.
No autologin upon initial connection.
Verbose. Show all responses from remote server.
Invoke an interactive shell on the local machine. If arguments are given, the first is taken as a command to execute directly, with the rest of the arguments as that command's arguments.
Execute the macro macro-name that was defined with the macdef command. Arguments are passed to the macro unglobbed.
Supply a supplemental password that will be required by a remote system for access to resources once a login has been successfully completed. If no argument is given, the user will be prompted for an account password in a non-echoing mode.
Append a local file to a file on the remote machine. If remote-file is not given, the local filename is used after being altered by any ntrans or nmap setting. File transfer uses the current settings for type, format, mode, and structure.
Set the file transfer type to network ASCII (default).
Sound a bell after each file transfer command is completed.
Set file transfer type to support binary image transfer.
Terminate FTP session and then exit ftp
Toggle remote-computer filename case mapping during mget. The default is off. When case is on, files on the remote machine with all-uppercase names will be copied to the local machine with all-lowercase names.
Change working directory on remote machine to remote-directory.
Change working directory of remote machine to its parent directory.
Change file permissions of remote-file. If options are omitted, the command prompts for them.
Terminate FTP session and return to command interpreter.
Toggle carriage-return stripping during ASCII-type file retrieval.
Delete file remote-file on remote machine.
Toggle debugging mode. If debug-value is specified, it is used to set the debugging level.
Print a listing of the contents in the directory remote-directory and, optionally, place the output in local-file. If no directory is specified, the current working directory on the remote machine is used. If no local file is specified or - is given instead of the filename, output comes to the terminal.
Synonym for close.
Set the file transfer form to format. Default format is file.
Retrieve the remote-file and store it on the local machine. If the local filename is not specified, it is given the same name it has on the remote machine, subject to alteration by the current case, ntrans, and nmap settings. If local file is -, output comes to the terminal.
Toggle filename expansion for mdelete, mget, and mput. If globbing is turned off, the filename arguments are taken literally and not expanded.
Toggle hash sign (#) printing for each data block transferred.
Print help information for command. With no argument, ftp
prints a list of commands.
Get/set idle timer on remote machine. seconds specifies the length of the idle timer; if omitted, the current idle timer is displayed.
Same as binary.
Change working directory on local machine. If directory is not specified, the user's home directory is used.
Print listing of contents of directory on remote machine, in a format chosen by the remote machine. If remote-directory is not specified, current working directory is used.
Define a macro. Subsequent lines are stored as the macro macro-name; a null line terminates macro input mode. When $i is included in the macro, loop through arguments, substituting the current argument for $i on each pass. Escape $ with \.
Delete the remote-files on the remote machine.
Like dir, except multiple remote files may be specified.
Expand the wildcard expression remote-files on the remote machine and do a get for each filename thus produced.
Make a directory on the remote machine.
Like nlist, except multiple remote files may be specified, and the local file must be specified.
Set file transfer mode to mode-name. Default mode is stream mode.
Show last modification time of the file on the remote machine.
Expand wildcards in local-files given as arguments and do a put for each file in the resulting list.
Get file if remote file is newer than local file.
Print list of files in a directory on the remote machine to local-file (or to the screen if local-file is not specified). If remote-directory is unspecified, the current working directory is used.
Set or unset the filename mapping mechanism. The mapping follows the pattern set by inpattern, a template for incoming filenames, and outpattern, which determines the resulting mapped filename. The sequences $1 through $9 are treated as variables; for example, the inpattern $1.$2, along with the input file readme.txt, would set $1 to readme and $2 to txt. An outpattern of $1.data would result in an output file of readme.data. $0 corresponds to the complete filename. [string1, string2] is replaced by string1 unless that string is null, in which case it's replaced by string2.
Set or unset the filename character translation mechanism. Characters in a filename matching a character in inchars are replaced with the corresponding character in outchars. If no arguments are specified, the filename mapping mechanism is unset. If arguments are specified:
Characters in remote filenames are translated during mput and put commands issued without a specified remote target filename.
Characters in local filenames are translated during mget and get commands issued without a specified local target filename.
Establish a connection to the specified host FTP server. An optional port number may be supplied, in which case ftp
will attempt to contact an FTP server at that port.
Toggle interactive prompting.
Execute an FTP command on a secondary control connection (i.e., send commands to two separate remote hosts simultaneously).
Store a local file on the remote machine. If remote-file is left unspecified, the local filename is used after processing according to any ntrans or nmap settings in naming the remote file. File transfer uses the current settings for type, file, structure, and transfer mode.
Print name of the current working directory on the remote machine.
Synonym for bye.
Send the arguments specified, verbatim, to the remote FTP server.
Synonym for get.
Retrieve a file (like get), but restart at the end of local-file. Useful for restarting a dropped transfer.
Request help from the remote FTP server. If command-name is specified, remote help for that command is returned.
Show status of the remote machine or, if filename is specified, of filename on remote machine.
Rename file from on remote machine to to.
Clear reply queue.
Restart the transfer of a file from a particular byte count.
Delete a directory on the remote machine.
Toggle storing of files on the local system with unique filenames. When this option is on, rename files as .1 or .2, and so on, as appropriate, to preserve unique filenames, and report each such action. Default value is off.
Synonym for put.
Toggle the use of PORT commands.
Get/set site-specific information from/on remote machine.
Return size of filename on remote machine.
Show current status of ftp
Set the file transfer structure to struct-name. By default, stream structure is used.
Toggle storing of files on remote machine under unique filenames.
Show type of operating system running on remote machine.
Set file transfer type to that needed to talk to TENEX machines.
Toggle packet tracing.
Set file transfer type to type-name. If no type is specified, the current type is printed. The default type is network ASCII.
Set user file-creation mode mask on the remote site. If mask is omitted, the current value of the mask is printed.
Identify yourself to the remote FTP server. ftp
will prompt the user for the password (if not specified and the server requires it) and the account field.
Toggle verbose mode.
Same as help.