ftpls(1)
π ftpls β the ftp directory listing glow-up π
okay bestie, welcome to the ftpls(1) era β¨ this is a User Command, and honestly? she's iconic. let's get into it π«Ά
πΈ NAME πΈ
ftpls β generate a ftp directory listing. that's it, that's the whole job, and she does it gorgeously π
β¨ SYNOPSIS β¨
ftpls [options] host[:port] [remotedir]
or: ftpls [options] URL
π¦ DESCRIPTION π¦
so ftpls generates a listing of files and directories in a FTP directory. lowkey simple, highkey powerful. by default it prints a human readable ascii output, but bestie she can also create HTML and machine parsable output. range! π
π OPTIONS π
π Connect / login / username / password options
-u,--user=NAMEβ use NAME to login on the ftp server. the default isanonymous. use an empty name to force the program to not log in at all. π-p,--pass=PASSWORDβ use PASS as password to login on the ftp server. the default isanonymous@invalid.example. if an empty password is given the programm will not send a password to the server.--account=ACCOUNTβ send ACCOUNT as account name during login phase. note: this is not the user name, but the name of what could be called a subaccount implemented by a few servers. if you don't understand what it means you have a good chance to never need this option anyway. if you think you need it please try the--useroption first. π€--tries=ARGβ number of tries to connect and log in. the default is 1, meaning that the program will give up after the first error. this option was added in version 0.3.0.--data-connect-retries=ARGβ number of tries to connect to data port. the program will try to reach the data port (for retrieval of listings or data) that many times and will give up after that many errors in a row. the default is 5, meaning that the program will give up after the fifth error. this option was added in version 0.6.6. the old behaviour was to give up after the first error. π--login-sleep=ARGβ seconds to sleep after a failed login. more precisely: the program will fall to sleep for this many seconds after a try to connect or login has failed. the default is 5. a 0 is treated as 1, and abuse, especially together with--tries, is likely to annory the servers adminstrators. π this option was added in version 0.4.5.-4,--v4β only use IPv4, even if v6 is available. this option effectively disallows the use of IPv6, except for DNS queries. it was added in version 0.6.0.-6,--v6β only use IPv6, even if v4 is available. this option effectively disallows the use of IPv4, except for DNS queries. it was added in version 0.6.0.
π οΈ Operational options
--interactiveβ read directories from stdin. this option tells ftpls to ignore any directories given on the command line, and to read the directories to list from the standard input, reading one directory per line. ftpls will print an END-OF-COPY line after each operation. do not use this option together with--html. this option was added in version 0.3.6 and will be removed in future versions, unless someone objects. π-T,--timeout=SECONDSβ timeout to use for network read/write. the default is 30 seconds and is usually sufficient. this option was added in version 0.3.8.-R,--recursiveβ do recursive listing. this option makes ftpls descend through the directory hierarchy and list all the directories and files it files. a top level directories content will be printed completely before the sub directories will be traversed. π--rawβ raw output in original format. this will preserve the original format and sort order.--max-depth=ARGβ descend at most LEVEL directories.0meansdo not enter sub directories at all,1meansenter sub-directories, but not their sub-directories. the default is2^32-1meaningenter all. this option enables the--recursiveoption.
π€ Sorting options
-a,--alphaβ sort alphabetical.-z,--omegaβ sort reverse alphabetical.-n,--newestβ sort youngest first.-o,--oldestβ sort oldest first.-s,--shortestβ sort shortest first.-l,--longestβ sort longest first.
π¨οΈ Output options
-h,--htmlβ OBSOLETE: create HTML index. this option is no longer supported. π-m,--machineβ create machine parsable output. π€-t,--title=TEXTβ title text to use on the HTML output.-U,--urlprefix=URLβ URL-Prefix to use in listings. if this option is not given then an URL given on the command line will be used instead, and if this has not been given an URL will be created from host, port and directory given on the command line.--print-dirβ print sub directory names. this option makes ftpls print the name of a directory before it lists it's content. note that the name of the top level directory of each listing will not be printed. this option is meant to be used together with--raw, and will not create useful output together with--html.
π©Ή Workaround options
--ascii-listingsβ do directory listings in ASCII mode. use this option if the FTP server is unable to correctly list directories in binary mode, for example, if you see a message like this (usually on one line):
fatal: received unwanted answer to LIST: 426 Data connection:
Illegal seek.
this option was added in version 0.5.2.
-L,--list-options=OPTSβ add OPTS to LIST command. this allows to pass arbitrary options to the FTP servers LIST command. note that ftpcopy does not cope well with recursive directory listings. this option was added in version 0.3.0.--allow-pasv-ip=IP4β allow data connections to the address IP4. normally ftpls only accepts data connections to the IP addresses it received as an answer to the DNS request, or the IP address in the URL. sometimes this is not enough, especially when NAT or masquerading are active. ftpcopy then prints an error messageillegal redirect by FTP server. with this option, which may be given more than once, you can add additional addresses to the internal list of allowed data connection targets. IP4 has to be an IPv4 address or a list of IPv4 addresses, separated by commas. the environment variableFTPCOPY_ALLOW_PASV_IPserves the same purpose.
β οΈ note: do not use this option without thinking: FTP redirects may be used to launch denial of service attacks against innocent targets. π
this option was added in version 0.6.1.
--force-selectβ use select, not poll. do not use thepoll()system call even if it's available, but useselect()instead. this allows the program to be used together withrunsocksfrom the socks5 reference implementation. please note that you will need a directly reachable name server anyway, as the DNS library in use does not support SOCKS (you can always use IP addresses). this option was added in version 0.3.8.
π Help options
--examplesβ show usage examples.--see-alsoβ where to find related information.--versionβ show version:ftpls (ftpcopy) 0.6.7.--helpβ show a list of options or the long help on one. the use with an argument shows the long help text of that option, without an argument it will list all options.--longhelpβ show longer help texts for all or one option.
π EXAMPLES π
generate a HTML index page (yes bestie, this exact invocation, character for character π):
ftpls \
--html --title 'CVS tree index by date' \
--urlprefix ftp://ftp.ohse.de/uwe/cvs-trees/ \
--newest \
ftp://serak.ohse.de/uwe/cvs-trees \
> SOMEWHERE/cvs-trees/index-by-date.html
π COPYRIGHT π
copyright (C) 2003 Uwe Ohse.
the software comes with NO WARRANTY, to the extent permitted by law. π«Ά
this package is published unter the terms of the GNU General Public License version 2. later versions of the GPL may or may not apply, see http://www.ohse.de/uwe/licenses/
π AUTHOR π
Uwe Ohse, <uwe@ohse.de>.
π MORE INFORMATION π
please report bugs to <ftpcopy@lists.ohse.de> β she reads her mail, fr fr π
π SEE ALSO π
ftpcopy(1)creates and maintains ftp mirrors.- the ftpcopy package has a mailing list. send an empty mail to
<ftpcopy-subscribe@lists.ohse.de>to subscribe to it. - the ftpcopy homepage is at:
http://www.ohse.de/uwe/ftpcopy.html
and that's the whole page bestie, no cap π
this was ftpls(1) from the ftpcopy crew, dated 2005-04-28 β go forth and list those directories, you absolute main character πβ¨π
π¦ where this page comes from
- debian bookworm: ftpcopy 0.6.7-5
- debian trixie: ftpcopy 0.6.7-7 Β· GPL-2.0-only
- ubuntu jammy: ftpcopy 0.6.7-5
- ubuntu noble: ftpcopy 0.6.7-6
- ubuntu questing: ftpcopy 0.6.7-7
- ubuntu resolute: ftpcopy 0.6.7-9 Β· GPL-2.0-only
- ubuntu stonking: ftpcopy 0.6.7-9 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms