nushell/docs/commands/ls.md
Justin Ma c0a1d18e3d
update #4455, regenerate commands' docs and update make_docs script (#4586)
* feat: update #4455, regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

684 B

title layout version
ls command 0.59.0

List the files in a directory.

Signature

> ls (pattern) --all --long --short-names --full-paths --du

Parameters

  • pattern: the glob pattern to use
  • --all: Show hidden files
  • --long: List all available columns for each entry
  • --short-names: Only print the file names and not the path
  • --full-paths: display paths as absolute paths
  • --du: Display the apparent directory size in place of the directory metadata size

Examples

List all files in the current directory

> ls

List all files in a subdirectory

> ls subdir

List all rust files

> ls *.rs