• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: list-only
5Short: l
6Protocols: FTP POP3 SFTP
7Help: List only mode
8Added: 4.0
9Category: ftp pop3 sftp
10Multi: boolean
11See-also:
12  - quote
13  - request
14Example:
15  - --list-only ftp://example.com/dir/
16---
17
18# `--list-only`
19
20(FTP)
21When listing an FTP directory, this switch forces a name-only view. This is
22especially useful if the user wants to machine-parse the contents of an FTP
23directory since the normal directory view does not use a standard look or
24format. When used like this, the option causes an NLST command to be sent to
25the server instead of LIST.
26
27Note: Some FTP servers list only files in their response to NLST; they do not
28include sub-directories and symbolic links.
29
30(SFTP)
31When listing an SFTP directory, this switch forces a name-only view, one per line.
32This is especially useful if the user wants to machine-parse the contents of an
33SFTP directory since the normal directory view provides more information than just
34file names.
35
36(POP3)
37When retrieving a specific email from POP3, this switch forces a LIST command
38to be performed instead of RETR. This is particularly useful if the user wants
39to see if a specific message-id exists on the server and what size it is.
40
41Note: When combined with --request, this option can be used to send a UIDL
42command instead, so the user may use the email's unique identifier rather than
43its message-id to make the request.
44