Skip to content
jc-rs
GitHub

ls

--lsv1.12.0

Converts `ls` and `vdir` command output to JSON

command
$ ls | jc-rs --ls

A real pair

From the reference corpus (centos-7.7/ls.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

lscentos-7.7
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "filename": "bin"
  },
  {
    "filename": "boot"
  },
  {
    "filename": "dev"
  },
  {
    "filename": "etc"
  },
  {
    "filename": "home"
  },
  {
    "filename": "lib"
  },
  {
    "filename": "lib64"
  },
  {
    "filename": "media"
  },
  {
    "filename": "mnt"
  },
  {
    "filename": "opt"
  },
  {
    "filename": "proc"
  },
  {
    "filename": "root"
  },
  {
    "filename": "run"
  },
  {
    "filename": "sbin"
  },
  {
    "filename": "srv"
  },
  {
    "filename": "sys"
  },
  {
    "filename": "tmp"
  },
  {
    "filename": "usr"
  },
  {
    "filename": "var"
  }
]

Fixture coverage

35/35oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs lsjc-rs runs the command itself and parses what it prints. Recognised for: `ls`, `vdir`

Source: crates/jc-rs-parsers/src/system/ls.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare