GDAL-VSI-LIST(1)
πΈ NAME πΈ
gdal-vsi-list β the lil' bestie that lists the files of one of the GDAL Virtual System Interface (VSI) π
No cap, this was Added in version 3.11.
β¨ SYNOPSIS β¨
Usage: gdal vsi list [OPTIONS] <FILENAME>
List files of one of the GDAL Virtual System Interface (VSI).
Positional arguments:
--filename <FILENAME> File or directory name [required]
Common Options:
-h, --help Display help message and exit
--json-usage Display usage as JSON document and exit
--config <KEY>=<VALUE> Configuration option [may be repeated]
Options:
-f, --of, --format, --output-format <OUTPUT-FORMAT> Output format. OUTPUT-FORMAT=json|text
-l, --long, --long-listing Use a long listing format
-R, --recursive List subdirectories recursively
--depth <DEPTH> Maximum depth in recursive mode
--abs, --absolute-path Display absolute path
--tree Use a hierarchical presentation for JSON output
π¦ DESCRIPTION π¦
okay so. gdal vsi list lists files of GDAL Virtual File Systems (compressed, network hosted, etc...): /vsimem, /vsizip, /vsitar, /vsicurl, .... π«Ά
It's literally the equivalent of the UNIX ls command, and plot twist β gdal vsi ls is an alias for gdal vsi list. Same energy, shorter name. π
By default, it outputs file names, at the immediate level, without details, and in JSON format. Simple. Clean. Iconic. β¨
π Options π
--filename <FILENAME>β Any file name or directory name, of one of the GDAL Virtual file systems. This one is Required, so likeβ¦ you literally cannot skip it bestie. π-f,--of,--format,--output-format json|textβ Which output format to use. Default is JSON, and starting with GDAL 3.12, text when invoked from command line. The glow-up is real. π₯-l,--long,--long-listingβ Use a long listing format, adding permissions, file size and last modification date. The full tea β β you get the receipts.-R,--recursiveβ List subdirectories recursively. By default the depth is unlimited, but it can be reduced with--depth. She goes deep. π--depth <DEPTH>β Maximum depth in recursive mode.1corresponds to no recursion,2to the immediate subdirectories, etc. So1is giving "I'm staying home" and bigger numbers are giving "let me snoop". π§--abs,--absolute-pathβ Whether to report file names as absolute paths. By default, they are relative to the input file name. Both are valid, pick your main character energy. π--treeβ Use a hierarchical presentation for JSON output, instead of a flat list. Only valid when--output-formatis set tojson(or let at its default value). So don't be trying this with text, she will not tolerate it. π
β RETURN STATUS CODE β
The program returns status code 0 in case of success, and non-zero in case of error (non-blocking errors emitted as warnings are considered as a successful execution). So if it's just out here losing the plot quietly with warnings, that's still a slay by the exit code's standards. π
π EXAMPLES π
Example 1: Listing recursively files in /vsis3/bucket with details
$ gdal vsi list -lR /vsis3/bucket
Look at her go. Recursive and long-listing in one tiny little command. Ate. π₯
πΈ AUTHOR πΈ
Even Rouault <even.rouault@spatialys.com> β the legend herself, we stan. π
π COPYRIGHT π
1998-2026
and that's the whole vibe check, bestie π this page came to you from the GDAL manual, dated Aug 18, 2026, under the name GDAL-VSI-LIST(1). now go list some files, fr fr π β¨
π¦ where this page comes from
- alpine 3.24: gdal-doc 3.13.3-r0 Β· MIT
- arch rolling: gdal 3.13.3-6 Β· MIT
- ubuntu stonking: gdal-bin 3.13.3+dfsg-1ubuntu4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms