ls

vb ls [OPTIONS] [PATHS ...]

Description

List all files in the current check-out. If PATHS is included, only the named files (or their children if directories) are shown.

The ls command is essentially two related commands in one, depending on whether or not the -r option is given. -r selects a specific check-in version to list, in which case -R can be used to select the repository. The fine behavior of the --age, -v, and -t options is altered by the -r option as well, as explained below.

The --age option displays file commit times. Like -r, --age has the side effect of making -t sort by commit time, not modification time.

The -v option provides extra information about each file. Without -r, -v displays the change status, in the manner of the changes command. With -r, -v shows the commit time and size of the checked-in files.

The -t option changes the sort order. Without -t, files are sorted by path and name (case insensitive sort if -r). If neither --age nor -r are used, -t sorts by modification time, otherwise by commit time.

Options

--age

Show when each file was committed

--hash

With -v, verify file status using hashing rather than relying on file sizes and mtimes

-r VERSION

The specific check-in to list

-R, --repository REPO

Extract info from repository REPO

-t

Sort output in time order

--tree

Tree format

-v, --verbose

Provide extra information about each file

Examples

  • Init and open a repository

$ vb init ls_repo.vbyte
project-id: 4462fec0a53eecde0be3d62379382f01c3846e67
server-id:  c7d17b106a2498977e965aa5ee74d605ada8d994
admin-user: ubuntu (initial remote-access password is "FK4MndJ8Y2")
$ vb open -f ls_repo.vbyte
project-name: <unnamed>
repository:   /tmp/sphinx_tests/33f9315c/ls_repo/ls_repo.vbyte
local-root:   /tmp/sphinx_tests/33f9315c/ls_repo/
config-db:    /tmp/sphinx_tests/33f9315c/.visionbyte
project-code: 4462fec0a53eecde0be3d62379382f01c3846e67
checkout:     267c86c9a8550d454e871aeb7b756b3e9250346c 2026-03-31 13:00:26 UTC
tags:         trunk
comment:      initial empty check-in (user: ubuntu)
check-ins:    1
  • Add and commit file

$ vb sys mkdir src
$ vb sys echo "int main(){}" > src/main.c
$ vb sys echo "test" > test.txt
$ vb sys echo "README" > README.md
$ vb sys echo "extra file" > extra.txt
$ vb add src test.txt README.md
ADDED  README.md
ADDED  src/main.c
ADDED  test.txt
$ vb ci -m "seed"
Committed version: 56de4538acd55153600d32c626b33052f86a11e673adc134d2cf35c02c0b57b1
  • List files in repository

$ vb ls --tree
/tmp/sphinx_tests/33f9315c/ls_repo/
├── README.md
├── src
│   └── main.c
└── test.txt

See Also

See also

changes, extras, status, tree