xref: /aosp_15_r20/external/curl/docs/cmdline-opts/list-only.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: list-only
5*6236dae4SAndroid Build Coastguard WorkerShort: l
6*6236dae4SAndroid Build Coastguard WorkerProtocols: FTP POP3 SFTP FILE
7*6236dae4SAndroid Build Coastguard WorkerHelp: List only mode
8*6236dae4SAndroid Build Coastguard WorkerAdded: 4.0
9*6236dae4SAndroid Build Coastguard WorkerCategory: ftp pop3 sftp file
10*6236dae4SAndroid Build Coastguard WorkerMulti: boolean
11*6236dae4SAndroid Build Coastguard WorkerSee-also:
12*6236dae4SAndroid Build Coastguard Worker  - quote
13*6236dae4SAndroid Build Coastguard Worker  - request
14*6236dae4SAndroid Build Coastguard WorkerExample:
15*6236dae4SAndroid Build Coastguard Worker  - --list-only ftp://example.com/dir/
16*6236dae4SAndroid Build Coastguard Worker---
17*6236dae4SAndroid Build Coastguard Worker
18*6236dae4SAndroid Build Coastguard Worker# `--list-only`
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard WorkerWhen listing an FTP directory, force a name-only view. Maybe particularly
21*6236dae4SAndroid Build Coastguard Workeruseful if the user wants to machine-parse the contents of an FTP directory
22*6236dae4SAndroid Build Coastguard Workersince the normal directory view does not use a standard look or format. When
23*6236dae4SAndroid Build Coastguard Workerused like this, the option causes an NLST command to be sent to the server
24*6236dae4SAndroid Build Coastguard Workerinstead of LIST.
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard WorkerNote: Some FTP servers list only files in their response to NLST; they do not
27*6236dae4SAndroid Build Coastguard Workerinclude sub-directories and symbolic links.
28*6236dae4SAndroid Build Coastguard Worker
29*6236dae4SAndroid Build Coastguard WorkerWhen listing an SFTP directory, this switch forces a name-only view, one per
30*6236dae4SAndroid Build Coastguard Workerline. This is especially useful if the user wants to machine-parse the
31*6236dae4SAndroid Build Coastguard Workercontents of an SFTP directory since the normal directory view provides more
32*6236dae4SAndroid Build Coastguard Workerinformation than just filenames.
33*6236dae4SAndroid Build Coastguard Worker
34*6236dae4SAndroid Build Coastguard WorkerWhen retrieving a specific email from POP3, this switch forces a LIST command
35*6236dae4SAndroid Build Coastguard Workerto be performed instead of RETR. This is particularly useful if the user wants
36*6236dae4SAndroid Build Coastguard Workerto see if a specific message-id exists on the server and what size it is.
37*6236dae4SAndroid Build Coastguard Worker
38*6236dae4SAndroid Build Coastguard WorkerFor FILE, this option has no effect yet as directories are always listed in
39*6236dae4SAndroid Build Coastguard Workerthis mode.
40*6236dae4SAndroid Build Coastguard Worker
41*6236dae4SAndroid Build Coastguard WorkerNote: When combined with --request, this option can be used to send a UIDL
42*6236dae4SAndroid Build Coastguard Workercommand instead, so the user may use the email's unique identifier rather than
43*6236dae4SAndroid Build Coastguard Workerits message-id to make the request.
44