ftp(1) - perldoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


TLDR: ftp (tldr-pages)

Tools to interact with a server via File Transfer Protocol.

  • Connect to an FTP server and run in interactive mode
    ftp {{ftp.example.com}}
  • Connect to an FTP server specifying its IP address and port
    ftp {{ip_address}} {{port}}
  • [Interactive] Switch to binary transfer mode (graphics, compressed files, etc)
    binary
  • [Interactive] Transfer multiple files without prompting for confirmation on every file
    prompt off
  • [Interactive] Download multiple files (glob expression)
    mget {{*.png}}
  • [Interactive] Upload multiple files (glob expression)
    mput {{*.zip}}
  • [Interactive] Delete multiple files on the remote server
    mdelete {{*.txt}}
  • [Interactive] Rename a file on the remote server
    rename {{original_filename}} {{new_filename}}
Found in /usr/share/perl/5.34/pod/perlfaq8.pod
  Can I use perl to run a telnet or ftp session?
    Try the Net::FTP, TCP::Client, and Net::Telnet modules (available from
    CPAN). <http://www.cpan.org/scripts/netstuff/telnet.emul.shar> will also
    help for emulating the telnet protocol, but Net::Telnet is quite
    probably easier to use.

    If all you want to do is pretend to be telnet but don't need the initial
    telnet handshaking, then the standard dual-process approach will
    suffice:

        use IO::Socket;             # new in 5.004
        my $handle = IO::Socket::INET->new('www.perl.com:80')
            or die "can't connect to port 80 on www.perl.com $!";
        $handle->autoflush(1);
        if (fork()) {               # XXX: undef means failure
            select($handle);
            print while <STDIN>;    # everything from stdin to socket
        } else {
            print while <$handle>;  # everything from socket to stdout
        }
        close $handle;
        exit;

Found in /usr/share/perl/5.34/pod/perlfaq9.pod
  How do I fetch/put an (S)FTP file?
    Net::FTP, and Net::SFTP allow you to interact with FTP and SFTP (Secure
    FTP) servers.


Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 18:24 @216.73.216.151 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!