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