{
    "mode": "man",
    "parameter": "ncftpls",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ncftpls/1/json",
    "generated": "2026-06-15T14:40:13Z",
    "synopsis": "ncftpls [options] ftp://url.style/host/path/name/",
    "sections": {
        "NAME": {
            "content": "ncftpls - Internet file transfer program for scripts\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ncftpls [options] ftp://url.style/host/path/name/\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "Command line flags:",
                    "content": ""
                },
                {
                    "name": "-m",
                    "content": "the server software support the MLSD extensions, and many implementations do not have\nthese features.\n",
                    "flag": "-m"
                },
                {
                    "name": "-1",
                    "content": "",
                    "flag": "-1"
                },
                {
                    "name": "-l",
                    "content": "",
                    "flag": "-l"
                },
                {
                    "name": "-C",
                    "content": "",
                    "flag": "-C"
                },
                {
                    "name": "-R",
                    "content": "",
                    "flag": "-R"
                },
                {
                    "name": "-a",
                    "content": "",
                    "flag": "-a"
                },
                {
                    "name": "-i",
                    "content": "",
                    "flag": "-i"
                },
                {
                    "name": "-x -",
                    "content": "",
                    "flag": "-x"
                },
                {
                    "name": "-u",
                    "content": "",
                    "flag": "-u"
                },
                {
                    "name": "-p",
                    "content": "",
                    "flag": "-p"
                },
                {
                    "name": "-P",
                    "content": "",
                    "flag": "-P"
                },
                {
                    "name": "-d",
                    "content": "",
                    "flag": "-d"
                },
                {
                    "name": "-t",
                    "content": "",
                    "flag": "-t"
                },
                {
                    "name": "-E",
                    "content": "",
                    "flag": "-E"
                },
                {
                    "name": "-F",
                    "content": "to regular if the passive connection fails or times out.\n",
                    "flag": "-F"
                },
                {
                    "name": "-r",
                    "content": "",
                    "flag": "-r"
                },
                {
                    "name": "-W",
                    "content": "",
                    "flag": "-W"
                },
                {
                    "name": "-X",
                    "content": "",
                    "flag": "-X"
                },
                {
                    "name": "-Y",
                    "content": "The -W, -X, and -Y options are useful for advanced users who need to  tweak  behavior\non  some  servers.   For  example, users accessing mainframes might need to send some\nspecial SITE commands to set blocksize and record format information.\n\nFor these options, you can use them multiple times each if you need to send  multiple\ncommands.   For  the  -X option, you can use the cookie %s to expand into the name of\nthe file that was transferred.\n",
                    "flag": "-Y"
                },
                {
                    "name": "-o",
                    "content": "This option is used primarily for debugging.  It sets the value of an internal  vari‐\nable to an integer value.  An example usage would be: -o useFEAT=0,useCLNT=1 which in\nthis case, disables use of the FEAT command and enables the CLNT command.  The avail‐\nable  variables  include:  usePASV,  useSIZE, useMDTM, useREST, useNLSTa, useNLSTd,\nuseFEAT, useMLSD, useMLST, useCLNT, useHELPSITE, useSITEUTIME,  STATfileParamWorks,\nNLSTfileParamWorks, require20, allowProxyForPORT, doNotGetStartCWD.\n",
                    "flag": "-o"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The  purpose  of  ncftpls is to do remote directory listings using the File Transfer Protocol\nwithout entering an interactive shell.  This lets you write shell scripts or other unattended\nprocesses that can do FTP.\n\nThe  default  behavior  is to print the directory listing in columnized format (i.e. ls -CF),\nbut that is not very useful for scripting.  This example uses the -1 flag, to print one  file\nper line:\n\n$ ncftpls -1 ftp://ftp.ncftp.com/pub/ncftp/\n\nYou can also do a remote \"ls -l\", by using \"ncftpls -l\".  If you want to try other flags, you\nhave to use them with the -x flag.  For example, if you wanted to do a remote \"ls -lrt\",  you\ncould do this:\n\n$ ncftpls -x \"-lrt\" ftp://ftp.ncftp.com/pub/ncftp/\n\nBy default the program tries to open the remote host and login anonymously, but you can spec‐\nify a username and password information like you can with ncftpget or ncftpput.\n\nNote that the standard specifies that URL pathnames are are  relative  pathnames.   For  FTP,\nthis  means that URLs specify relative pathnames from the start directory, which for user lo‐\ngins, are typically the user's home directory.  If you want to use  absolute  pathnames,  you\nneed to include a literal slash, using the \"%2F\" code for a \"/\" character.  Examples:\n\n$ ncftpls -u linus ftp://ftp.kernel.org/%2Fusr/src/\n$ ncftpls ftp://steve@ftp.apple.com/%2Fetc/\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "ncftpls returns the following exit values:\n\n0       Success.\n\n1       Could not connect to remote host.\n\n2       Could not connect to remote host - timed out.\n\n3       Transfer failed.\n\n4       Transfer failed - timed out.\n\n5       Directory change failed.\n\n6       Directory change failed - timed out.\n\n7       Malformed URL.\n\n8       Usage error.\n\n9       Error in login configuration file.\n\n10      Library initialization failed.\n\n11      Session initialization failed.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Mike Gleason, NcFTP Software (http://www.ncftp.com).\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ncftpput(1), ncftpget(1), ncftp(1), ftp(1), rcp(1), tftp(1).\n\nLibNcFTP (http://www.ncftp.com/libncftp/).\n\n\n\nncftpls                                    NcFTP Software                                 ncftpls(1)",
            "subsections": []
        }
    },
    "summary": "ncftpls - Internet file transfer program for scripts",
    "flags": [
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "the server software support the MLSD extensions, and many implementations do not have these features."
        },
        {
            "flag": "-1",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-R",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-i",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-E",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-F",
            "long": null,
            "arg": null,
            "description": "to regular if the passive connection fails or times out."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-W",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-X",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-Y",
            "long": null,
            "arg": null,
            "description": "The -W, -X, and -Y options are useful for advanced users who need to tweak behavior on some servers. For example, users accessing mainframes might need to send some special SITE commands to set blocksize and record format information. For these options, you can use them multiple times each if you need to send multiple commands. For the -X option, you can use the cookie %s to expand into the name of the file that was transferred."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "This option is used primarily for debugging. It sets the value of an internal vari‐ able to an integer value. An example usage would be: -o useFEAT=0,useCLNT=1 which in this case, disables use of the FEAT command and enables the CLNT command. The avail‐ able variables include: usePASV, useSIZE, useMDTM, useREST, useNLSTa, useNLSTd, useFEAT, useMLSD, useMLST, useCLNT, useHELPSITE, useSITEUTIME, STATfileParamWorks, NLSTfileParamWorks, require20, allowProxyForPORT, doNotGetStartCWD."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "ncftpput",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ncftpput/1/json"
        },
        {
            "name": "ncftpget",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ncftpget/1/json"
        },
        {
            "name": "ncftp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ncftp/1/json"
        },
        {
            "name": "ftp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ftp/1/json"
        },
        {
            "name": "rcp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/rcp/1/json"
        },
        {
            "name": "tftp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tftp/1/json"
        }
    ]
}