{
	"id": "ad297f81-1607-4888-b294-fc9258484bf4",
	"created_at": "2026-04-06T00:10:13.793089Z",
	"updated_at": "2026-04-10T03:19:59.010029Z",
	"deleted_at": null,
	"sha1_hash": "60f5fe5f6fb5c28a8d7a331bee5eb64a66f81015",
	"title": "ftp(1): Internet file transfer program",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 99434,
	"plain_text": "ftp(1): Internet file transfer program\r\nArchived: 2026-04-05 13:15:32 UTC\r\nftp(1) - Linux man page\r\nName\r\nftp - Internet file transfer program\r\nSynopsis\r\nftp [-pinegvd] [host]\r\npftp [-inegvd] [host]\r\nDescription\r\nFtp is the user interface to the Internet standard File Transfer Protocol. The program allows a user to transfer files\r\nto and from a remote network site.\r\nOptions may be specified at the command line, or to the command interpreter.\r\n -A' Use active mode for data transfers. This is useful fortransmissions to servers which d\r\n-p' Use passive mode for data transfers. Allows use of ftp in environments where a firewall prevents connections\r\nfrom the outside world back to the client machine. Requires that the ftp server support the PASV command. This\r\nis the default now for all clients (ftp and pftp) due to security concerns using the PORT transfer mode. The flag is\r\nkept for compatibility only and has no effect anymore.\r\n-i' Turns off interactive prompting during multiple file transfers.\r\n-n' Restrains ftp from attempting ''auto-login'' upon initial connection. If auto-login is enabled, ftp will check the\r\n.netrc (see netrc(5)) file in the user's home directory for an entry describing an account on the remote machine. If\r\nno entry exists, ftp will prompt for the remote machine login name (default is the user identity on the local\r\nmachine), and, if necessary, prompt for a password and an account with which to login.\r\n-e' Disables command editing and history support, if it was compiled into the ftp executable. Otherwise, does\r\nnothing.\r\n-g' Disables file name globbing.\r\n-m' The default requires that ftp explicitly binds to the same interface for the data channel as the control channel in\r\npassive mode. Useful on multi-homed clients. This option disables this behavior.\r\nhttps://linux.die.net/man/1/ftp\r\nPage 1 of 10\n\n-v' Verbose option forces ftp to show all responses from the remote server, as well as report on data transfer\r\nstatistics.\r\n-d' Enables debugging.\r\nThe client host with which ftp is to communicate may be specified on the command line. If this is done, ftp will\r\nimmediately attempt to establish a connection to an FTP server on that host; otherwise, ftp will enter its command\r\ninterpreter and await instructions from the user. When ftp is awaiting commands from the user the prompt 'ftp\u003e' is\r\nprovided to the user. The following commands are recognized by ftp:\r\n! [command [args]]\r\nInvoke an interactive shell on the local machine. If there are arguments, the first is taken to be a command to\r\nexecute directly, with the rest of the arguments as its arguments.\r\n$ macro-name [args]\r\nExecute the macro macro-name that was defined with the macdef command. Arguments are passed to the macro\r\nunglobbed.\r\naccount [passwd]\r\nSupply a supplemental password required by a remote system for access to resources once a login has been\r\nsuccessfully completed. If no argument is included, the user will be prompted for an account password in a non-echoing input mode.\r\nappend local-file [remote-file]\r\nAppend a local file to a file on the remote machine. If remote-file is left unspecified, the local file name is used in\r\nnaming the remote file after being altered by any ntrans or nmap setting. File transfer uses the current settings for\r\ntype, format, mode, and structure.\r\nascii' Set the file transfer type to network ASCII. This is the default type.\r\nbell' Arrange that a bell be sounded after each file transfer command is completed.\r\nbinary' Set the file transfer type to support binary image transfer.\r\nbye' Terminate the FTP session with the remote server and exit ftp. An end of file will also terminate the session\r\nand exit.\r\ncase' Toggle remote computer file name case mapping during mget commands. When case is on (default is off),\r\nremote computer file names with all letters in upper case are written in the local directory with the letters mapped\r\nto lower case.\r\ncd remote-directory\r\nChange the working directory on the remote machine to remote-directory.\r\ncdup' Change the remote machine working directory to the parent of the current remote machine working\r\ndirectory.\r\nhttps://linux.die.net/man/1/ftp\r\nPage 2 of 10\n\nchmod mode file-name\r\nChange the permission modes of the file file-name on the remote sytem to mode.\r\nclose' Terminate the FTP session with the remote server, and return to the command interpreter. Any defined\r\nmacros are erased.\r\ncr' Toggle carriage return stripping during ascii type file retrieval. Records are denoted by a carriage\r\nreturn/linefeed sequence during ascii type file transfer. When cr is on (the default), carriage returns are stripped\r\nfrom this sequence to conform with the UNIX single linefeed record delimiter. Records on non-UNIX remote\r\nsystems may contain single linefeeds; when an ascii type transfer is made, these linefeeds may be distinguished\r\nfrom a record delimiter only when cr is off.\r\ndelete remote-file\r\nDelete the file remote-file on the remote machine.\r\ndebug [debug-value]\r\nToggle debugging mode. If an optional debug-value is specified it is used to set the debugging level. When\r\ndebugging is on, ftp prints each command sent to the remote machine, preceded by the string '--\u003e'\r\ndir [remote-directory] [local-file]\r\nPrint a listing of the directory contents in the directory, remote-directory, and, optionally, placing the output in\r\nlocal-file. If interactive prompting is on, ftp will prompt the user to verify that the last argument is indeed the\r\ntarget local file for receiving dir output. If no directory is specified, the current working directory on the remote\r\nmachine is used. If no local file is specified, or local-file is -, output comes to the terminal.\r\ndisconnect\r\nA synonym for close.\r\nform format\r\nSet the file transfer form to format. The default format is ''file''.\r\nget remote-file [local-file]\r\nRetrieve the remote-file and store it on the local machine. If the local file name is not specified, it is given the\r\nsame name it has on the remote machine, subject to alteration by the current case, ntrans, and nmap settings. The\r\ncurrent settings for type, form, mode, and structure are used while transferring the file.\r\nglob' Toggle filename expansion for mdelete, mget and mput. If globbing is turned off with glob, the file name\r\narguments are taken literally and not expanded. Globbing for mput is done as in csh(1). For mdelete and mget,\r\neach remote file name is expanded separately on the remote machine and the lists are not merged. Expansion of a\r\ndirectory name is likely to be different from expansion of the name of an ordinary file: the exact result depends on\r\nthe foreign operating system and ftp server, and can be previewed by doing 'mls remote-files -' Note: mget and\r\nmput are not meant to transfer entire directory subtrees of files. That can be done by transferring a tar(1) archive\r\nof the subtree (in binary mode).\r\nhash' Toggle hash-sign (''#'') printing for each data block transferred. The size of a data block is 1024 bytes.\r\nhttps://linux.die.net/man/1/ftp\r\nPage 3 of 10\n\nhelp [command]\r\nPrint an informative message about the meaning of command. If no argument is given, ftp prints a list of the\r\nknown commands.\r\nidle [seconds]\r\nSet the inactivity timer on the remote server to seconds seconds. If seconds is ommitted, the current inactivity\r\ntimer is printed.\r\nlcd [directory]\r\nChange the working directory on the local machine. If no directory is specified, the user's home directory is used.\r\nls [remote-directory] [local-file]\r\nPrint a listing of the contents of a directory on the remote machine. The listing includes any system-dependent\r\ninformation that the server chooses to include; for example, most UNIX systems will produce output from the\r\ncommand 'ls -l'. (See also nlist.) If remote-directory is left unspecified, the current working directory is used. If\r\ninteractive prompting is on, ftp will prompt the user to verify that the last argument is indeed the target local file\r\nfor receiving ls output. If no local file is specified, or if local-file is '-', the output is sent to the terminal.\r\nmacdef macro-name\r\nDefine a macro. Subsequent lines are stored as the macro macro-name; a null line (consecutive newline characters\r\nin a file or carriage returns from the terminal) terminates macro input mode. There is a limit of 16 macros and\r\n4096 total characters in all defined macros. Macros remain defined until a close command is executed. The macro\r\nprocessor interprets '$' and '\\' as special characters. A '$' followed by a number (or numbers) is replaced by the\r\ncorresponding argument on the macro invocation command line. A '$' followed by an 'i' signals that macro\r\nprocessor that the executing macro is to be looped. On the first pass '$i' is replaced by the first argument on the\r\nmacro invocation command line, on the second pass it is replaced by the second argument, and so on. A '\\'\r\nfollowed by any character is replaced by that character. Use the '\\' to prevent special treatment of the '$'.\r\nmdelete [remote-files]\r\nDelete the remote-files on the remote machine.\r\nmdir remote-files local-file\r\nLike dir, except multiple remote files may be specified. If interactive prompting is on, ftp will prompt the user to\r\nverify that the last argument is indeed the target local file for receiving mdir output.\r\nmget remote-files\r\nExpand the remote-files on the remote machine and do a get for each file name thus produced. See glob for details\r\non the filename expansion. Resulting file names will then be processed according to case, ntrans, and nmap\r\nsettings. Files are transferred into the local working directory, which can be changed with 'lcd directory'; new local\r\ndirectories can be created with '! mkdir directory'.\r\nmkdir directory-name\r\nMake a directory on the remote machine.\r\nmls remote-files local-file\r\nLike nlist, except multiple remote files may be specified, and the local-file must be specified. If interactive\r\nhttps://linux.die.net/man/1/ftp\r\nPage 4 of 10\n\nprompting is on, ftp will prompt the user to verify that the last argument is indeed the target local file for receiving\r\nmls output.\r\nmode [mode-name]\r\nSet the file transfer mode to mode-name. The default mode is ''stream'' mode.\r\nmodtime file-name\r\nShow the last modification time of the file on the remote machine.\r\nmput local-files\r\nExpand wild cards in the list of local files given as arguments and do a put for each file in the resulting list. See\r\nglob for details of filename expansion. Resulting file names will then be processed according to ntrans and nmap\r\nsettings.\r\nnewer file-name [local-file]\r\nGet the file only if the modification time of the remote file is more recent that the file on the current system. If the\r\nfile does not exist on the current system, the remote file is considered newer. Otherwise, this command is\r\nidentical to get.\r\nnlist [remote-directory] [local-file]\r\nPrint a list of the files in a directory on the remote machine. If remote-directory is left unspecified, the current\r\nworking directory is used. If interactive prompting is on, ftp will prompt the user to verify that the last argument is\r\nindeed the target local file for receiving nlist output. If no local file is specified, or if local-file is -, the output is\r\nsent to the terminal.\r\nnmap [inpattern outpattern]\r\nSet or unset the filename mapping mechanism. If no arguments are specified, the filename mapping mechanism is\r\nunset. If arguments are specified, remote filenames are mapped during mput commands and put commands\r\nissued without a specified remote target filename. If arguments are specified, local filenames are mapped during\r\nmget commands and get commands issued without a specified local target filename. This command is useful\r\nwhen connecting to a non-UNIX remote computer with different file naming conventions or practices. The\r\nmapping follows the pattern set by inpattern and outpattern. [Inpattern] is a template for incoming filenames\r\n(which may have already been processed according to the ntrans and case settings). Variable templating is\r\naccomplished by including the sequences '$1', '$2', ..., '$9' in inpattern. Use '\\' to prevent this special treatment of\r\nthe '$' character. All other characters are treated literally, and are used to determine the nmap [inpattern] variable\r\nvalues. For example, given inpattern $1.$2 and the remote file name \"mydata.data\", $1 would have the value\r\n\"mydata\", and $2 would have the value \"data\". The outpattern determines the resulting mapped filename. The\r\nsequences '$1', '$2', ...., '$9' are replaced by any value resulting from the inpattern template. The sequence '$0' is\r\nreplace by the original filename. Additionally, the sequence '[seq1, seq2]' is replaced by [seq1] if seq1 is not a null\r\nstring; otherwise it is replaced by seq2. For example, the command\r\nnmap $1.$2.$3 [$1,$2].[$2,file]\r\nwould yield the output filename \"myfile.data\" for input filenames \"myfile.data\" and \"myfile.data.old\",\r\n\"myfile.file\" for the input filename \"myfile\", and \"myfile.myfile\" for the input filename \".myfile\". Spaces may be\r\nhttps://linux.die.net/man/1/ftp\r\nPage 5 of 10\n\nincluded in outpattern, as in the example: 'nmap $1 sed \"s/ *$//\" \u003e $1' . Use the '\\' character to prevent special\r\ntreatment of the '$','[','[', and ',' characters.\r\n ntrans [inchars [outchars]]\r\nSet or unset the filename character translation mechanism. If no arguments are specified, the filename character\r\ntranslation mechanism is unset. If arguments are specified, characters in remote filenames are translated during\r\nmput commands and put commands issued without a specified remote target filename. If arguments are specified,\r\ncharacters in local filenames are translated during mget commands and get commands issued without a specified\r\nlocal target filename. This command is useful when connecting to a non-UNIX remote computer with different\r\nfile naming conventions or practices. Characters in a filename matching a character in inchars are replaced with\r\nthe corresponding character in outchars. If the character's position in inchars is longer than the length of outchars,\r\nthe character is deleted from the file name.\r\nopen host [port]\r\nEstablish a connection to the specified host FTP server. An optional port number may be supplied, in which case,\r\nftp will attempt to contact an FTP server at that port. If the auto-login option is on (default), ftp will also attempt\r\nto automatically log the user in to the FTP server (see below).\r\nprompt' Toggle interactive prompting. Interactive prompting occurs during multiple file transfers to allow the user\r\nto selectively retrieve or store files. If prompting is turned off (default is on), any mget or mput will transfer all\r\nfiles, and any mdelete will delete all files.\r\nproxy ftp-command\r\nExecute an ftp command on a secondary control connection. This command allows simultaneous connection to\r\ntwo remote ftp servers for transferring files between the two servers. The first proxy command should be an open,\r\nto establish the secondary control connection. Enter the command \"proxy ?\" to see other ftp commands executable\r\non the secondary connection. The following commands behave differently when prefaced by proxy: open will not\r\ndefine new macros during the auto-login process, close will not erase existing macro definitions, get and mget\r\ntransfer files from the host on the primary control connection to the host on the secondary control connection, and\r\nput, mput, and append transfer files from the host on the secondary control connection to the host on the primary\r\ncontrol connection. Third party file transfers depend upon support of the ftp protocol PASV command by the\r\nserver on the secondary control connection.\r\nput local-file [remote-file]\r\nStore a local file on the remote machine. If remote-file is left unspecified, the local file name is used after\r\nprocessing according to any ntrans or nmap settings in naming the remote file. File transfer uses the current\r\nsettings for type, format, mode, and structure.\r\npwd' Print the name of the current working directory on the remote machine.\r\nquit' A synonym for bye.\r\nquote arg1 arg2 ...\r\nThe arguments specified are sent, verbatim, to the remote FTP server.\r\nhttps://linux.die.net/man/1/ftp\r\nPage 6 of 10\n\nrecv remote-file [local-file]\r\nA synonym for get.\r\nreget remote-file [local-file]\r\nReget acts like get, except that if local-file exists and is smaller than remote-file, local-file is presumed to be a\r\npartially transferred copy of remote-file and the transfer is continued from the apparent point of failure. This\r\ncommand is useful when transferring very large files over networks that are prone to dropping connections.\r\nremotehelp [command-name]\r\nRequest help from the remote FTP server. If a command-name is specified it is supplied to the server as well.\r\nremotestatus [file-name]\r\nWith no arguments, show status of remote machine. If file-name is specified, show status of file-name on remote\r\nmachine.\r\nrename [from] [to]\r\nRename the file from on the remote machine, to the file to.\r\nreset' Clear reply queue. This command re-synchronizes command/reply sequencing with the remote ftp server.\r\nResynchronization may be necessary following a violation of the ftp protocol by the remote server.\r\nrestart marker\r\nRestart the immediately following get or put at the indicated marker. On UNIX systems, marker is usually a byte\r\noffset into the file.\r\nrmdir directory-name\r\nDelete a directory on the remote machine.\r\nrunique' Toggle storing of files on the local system with unique filenames. If a file already exists with a name\r\nequal to the target local filename for a get or mget command, a \".1\" is appended to the name. If the resulting name\r\nmatches another existing file, a \".2\" is appended to the original name. If this process continues up to \".99\", an\r\nerror message is printed, and the transfer does not take place. The generated unique filename will be reported.\r\nNote that runique will not affect local files generated from a shell command (see below). The default value is off.\r\nsend local-file [remote-file]\r\nA synonym for put.\r\nsendport' Toggle the use of PORT commands. By default, ftp will attempt to use a PORT command when\r\nestablishing a connection for each data transfer. The use of PORT commands can prevent delays when performing\r\nmultiple file transfers. If the PORT command fails, ftp will use the default data port. When the use of PORT\r\ncommands is disabled, no attempt will be made to use PORT commands for each data transfer. This is useful for\r\ncertain FTP implementations which do ignore PORT commands but, incorrectly, indicate they've been accepted.\r\nsite arg1 arg2 ...\r\nThe arguments specified are sent, verbatim, to the remote FTP server as a SITE command.\r\nhttps://linux.die.net/man/1/ftp\r\nPage 7 of 10\n\nsize file-name\r\nReturn size of file-name on remote machine.\r\nstatus' Show the current status of ftp.\r\nstruct [struct-name]\r\nSet the file transfer structure to struct-name. By default ''stream'' structure is used.\r\nsunique' Toggle storing of files on remote machine under unique file names. Remote ftp server must support ftp\r\nprotocol STOU command for successful completion. The remote server will report unique name. Default value is\r\noff.\r\nsystem' Show the type of operating system running on the remote machine.\r\ntenex' Set the file transfer type to that needed to talk to TENEX machines.\r\ntrace' Toggle packet tracing.\r\ntype [type-name]\r\nSet the file transfer type to type-name. If no type is specified, the current type is printed. The default type is\r\nnetwork ASCII.\r\numask [newmask]\r\nSet the default umask on the remote server to newmask. If newmask is ommitted, the current umask is printed.\r\nuser user-name [password] [account]\r\nIdentify yourself to the remote FTP server. If the password is not specified and the server requires it, ftp will\r\nprompt the user for it (after disabling local echo). If an account field is not specified, and the FTP server requires\r\nit, the user will be prompted for it. If an account field is specified, an account command will be relayed to the\r\nremote server after the login sequence is completed if the remote server did not require it for logging in. Unless\r\nftp is invoked with ''auto-login'' disabled, this process is done automatically on initial connection to the FTP\r\nserver.\r\nverbose' Toggle verbose mode. In verbose mode, all responses from the FTP server are displayed to the user. In\r\naddition, if verbose is on, when a file transfer completes, statistics regarding the efficiency of the transfer are\r\nreported. By default, verbose is on.\r\n? [command]\r\nA synonym for help.\r\nCommand arguments which have embedded spaces may be quoted with quote '\"' marks.\r\nAborting A File Transfer\r\nTo abort a file transfer, use the terminal interrupt key (usually Ctrl-C). Sending transfers will be immediately\r\nhalted. Receiving transfers will be halted by sending a ftp protocol ABOR command to the remote server, and\r\ndiscarding any further data received. The speed at which this is accomplished depends upon the remote server's\r\nhttps://linux.die.net/man/1/ftp\r\nPage 8 of 10\n\nsupport for ABOR processing. If the remote server does not support the ABOR command, an 'ftp\u003e' prompt will\r\nnot appear until the remote server has completed sending the requested file.\r\nThe terminal interrupt key sequence will be ignored when ftp has completed any local processing and is awaiting\r\na reply from the remote server. A long delay in this mode may result from the ABOR processing described above,\r\nor from unexpected behavior by the remote server, including violations of the ftp protocol. If the delay results\r\nfrom unexpected remote server behavior, the local ftp program must be killed by hand.\r\nFile Naming Conventions\r\nFiles specified as arguments to ftp commands are processed according to the following rules.\r\n1. If the file name '-' is specified, the stdin (for reading) or stdout(for writing) is used.\r\n2. If the first character of the file name is '|', the remainder of the argument is interpreted as a shell command. Ftp\r\nthen forks a shell, using popen(3) with the argument supplied, and reads (writes) from the stdout (stdin). If the\r\nshell command includes spaces, the argument must be quoted; e.g. ''\" ls -lt\"''. A particularly useful example of this\r\nmechanism is: ''dir more''.\r\n3. Failing the above checks, if ''globbing'' is enabled, local file names are expanded according to the rules used in\r\nthe csh(1); c.f. the glob command. If the ftp command expects a single local file (.e.g. put), only the first filename\r\ngenerated by the \"globbing\" operation is used.\r\n4. For mget commands and get commands with unspecified local file names, the local filename is the remote\r\nfilename, which may be altered by a case, ntrans, or nmap setting. The resulting filename may then be altered if\r\nrunique is on.\r\n5. For mput commands and put commands with unspecified remote file names, the remote filename is the local\r\nfilename, which may be altered by a ntrans or nmap setting. The resulting filename may then be altered by the\r\nremote server if sunique is on.\r\nFile Transfer Parameters\r\nThe FTP specification specifies many parameters which may affect a file transfer. The type may be one of ''ascii'',\r\n''image'' (binary), ''ebcdic'', and ''local byte size'' (for PDP-10's and PDP-20's mostly). Ftp supports the ascii and\r\nimage types of file transfer, plus local byte size 8 for tenex mode transfers.\r\nFtp supports only the default values for the remaining file transfer parameters: mode, form, and struct.\r\nEnvironment\r\nFtp utilizes the following environment variables.\r\nHOME' For default location of a .netrc file, if one exists.\r\nhttps://linux.die.net/man/1/ftp\r\nPage 9 of 10\n\nSHELL' For default shell.\r\nSee Also\r\nftpd(8), RFC 959\r\nHistory\r\nThe ftp command appeared in 4.2BSD.\r\nBugs\r\nCorrect execution of many commands depends upon proper behavior by the remote server.\r\nAn error in the treatment of carriage returns in the 4.2BSD ascii-mode transfer code has been corrected. This\r\ncorrection may result in incorrect transfers of binary files to and from 4.2BSD servers using the ascii type. Avoid\r\nthis problem by using the binary image type.\r\nLinux NetKit (0.17) August 15, 1999 Linux NetKit (0.17)\r\nReferenced By\r\ncadaver(1), curl(1), fetchmail(1), ftpcount(1), ftpdctl(8), ftpscrub(8), ftpshut(8), ftptop(1), ftpwho(1), lftp(1),\r\nlynx(1), mirrordir(1), ncftp(1), ncftpget(1), ncftpls(1), ncftpput(1), ping(8), proftpd(8), progress(1), pure-authd(8), pure-ftpd(8), pure-ftpwho(8), pure-mrtginfo(8), pure-pw(8), pure-pwconvert(8), pure-quotacheck(8), pure-statsdecode(8), pure-uploadscript(8), rcp(1), rexec(1), sftp(1), sitecopy(1), smbclient(1),\r\nuberftp(1), webcam(1), zftp(1), zshzftpsys(1)\r\nSource: https://linux.die.net/man/1/ftp\r\nhttps://linux.die.net/man/1/ftp\r\nPage 10 of 10",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://linux.die.net/man/1/ftp"
	],
	"report_names": [
		"ftp"
	],
	"threat_actors": [],
	"ts_created_at": 1775434213,
	"ts_updated_at": 1775791199,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/60f5fe5f6fb5c28a8d7a331bee5eb64a66f81015.pdf",
		"text": "https://archive.orkl.eu/60f5fe5f6fb5c28a8d7a331bee5eb64a66f81015.txt",
		"img": "https://archive.orkl.eu/60f5fe5f6fb5c28a8d7a331bee5eb64a66f81015.jpg"
	}
}