List contents from a supported URL (for example
ssh://, and other
Lists files and directories from an external location.
dvc list-url provides a
uniform interface to browse the contents of an external location using any
protocol that is understood by
dvc get-url or
dvc import-url. For example,
it is roughly equivalent to
aws s3 ls when using the
s3:// protocol, or
ssh user@host ls -a when using
url argument specifies the location of the data to be listed. It supports
several kinds of external data sources:
|Microsoft Azure Blob Storage|
|Google Cloud Storage|
If you installed DVC via
pip and plan to access cloud services as external
data sources, you might need to install these optional dependencies:
[ssh]. Alternatively, use
[all] to include them
all. The command should look like this:
pip install "dvc[s3]". (This example
boto3 library along with DVC to support S3 storage.)
Only the root directory is listed by default, but the
-R option can be used to
list files recursively.
--recursive- recursively list files in all subdirectories.
--size- show sizes.
--help- prints the usage/help message, and exit.
--quiet- do not write anything to standard output. Exit with 0 if no problems arise, otherwise a non-zero value.
--verbose- displays detailed tracing information.
This command will list objects and common prefixes under the specified path:
$ dvc list-url s3://bucket/path
DVC expects that AWS CLI is already configured. DVC will use the AWS credentials file to access S3.
$ dvc list-url ssh://email@example.com/path/to/data
Using default SSH credentials, the above command lists files and directories
$ dvc list-url /local/path/to/data
The above command will list the