11# list
22
3- List repository contents, including files, models, and directories tracked by
4- DVC (as <abbr >outputs</abbr >) and by Git.
3+ List project contents, including files, models, and directories tracked by DVC
4+ and by Git.
5+
6+ > Useful to find data to ` dvc get ` , ` dvc import ` , or for ` dvc.api ` functions.
57
68## Synopsis
79
@@ -16,17 +18,15 @@ positional arguments:
1618
1719## Description
1820
19- A side-effect of DVC is that it hides actual data paths, by effectively
20- replacing files and directories with <abbr >DVC files</abbr >. So you don't see
21- data files/dirs when you browse a <abbr >DVC repository</abbr > on Git hosting
22- (e.g. GitHub), you just see the ` dvc.yaml ` and ` .dvc ` files. This can make it
23- hard to navigate the project, for example to find files or directories for use
24- with ` dvc get ` , ` dvc import ` , or ` dvc.api ` functions.
21+ Produces a view of a <abbr >DVC repository</abbr > (usually online), listing data
22+ files and directories tracked by DVC alongside the remaining Git repo contents.
23+ This is useful because when you browse a hosted repository (e.g. on GitHub or
24+ with ` git ls-remote ` ), you only see the ` dvc.yaml ` and ` .dvc ` files with your
25+ code (files tracked by Git).
2526
26- This command produces a view of a DVC repository, as if files and directories
27- tracked by DVC were found directly in the Git repo. Its output is equivalent to
28- cloning the repo and [ pulling] ( /doc/command-reference/pull ) the data (except
29- that nothing is downloaded by ` dvc list ` ), like this:
27+ This command's output is equivalent to cloning the repo and
28+ [ pulling] ( /doc/command-reference/pull ) the data (except that nothing is
29+ downloaded), like this:
3030
3131``` dvc
3232$ git clone <url> example
@@ -35,17 +35,17 @@ $ dvc pull
3535$ ls <path>
3636```
3737
38- Only the root directory is listed by default, but the ` -R ` option can be used to
39- list files recursively.
40-
4138The ` url ` argument specifies the address of the DVC or Git repository containing
4239the data source. Both HTTP and SSH protocols are supported (e.g.
4340` [user@]server:project.git ` ). ` url ` can also be a local file system path
4441(including the current project e.g. ` . ` ).
4542
4643The optional ` path ` argument is used to specify a directory to list within the
47- source repository at ` url ` (including paths inside tracked directories). It's
48- similar to providing a path to list to commands such as ` ls ` or ` aws s3 ls ` .
44+ Git repo at ` url ` (including paths inside tracked directories). It's similar to
45+ providing a path to list to commands such as ` ls ` or ` aws s3 ls ` .
46+
47+ Only the root directory is listed by default, but the ` -R ` option can be used to
48+ list files recursively.
4949
5050Please note that ` dvc list ` doesn't check whether the listed data (tracked by
5151DVC) actually exists in remote storage, so it's not guaranteed whether it can be
0 commit comments