ceving / coreutilsj

coreutils generating JSON instead of human readable output

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

coreutilsj

Programs implementing the functionality of GNU's coreutils but generating JSON instead of human readable output.

Requirements

The JSON output is generated by the use of JQ's JSON value API, which is part of libjq.

Examples

statj

This is the output of the original stat command.

$ stat statj
  File: ‘statj’
  Size: 17573           Blocks: 40         IO Block: 4096   regular file
Device: fc01h/64513d    Inode: 8070        Links: 1
Access: (0775/-rwxrwxr-x)  Uid: ( 1000/ user)   Gid: ( 1000/ group)
Access: 2017-05-05 17:22:55.839267665 +0200
Modify: 2017-05-05 17:17:12.955285388 +0200
Change: 2017-05-05 17:17:12.955285388 +0200
 Birth: -

And this is the output of statj.

{
  "file": "statj",
  "device": 64513,
  "type": "regular file",
  "inode": 8070,
  "mode": 33277,
  "links": 1,
  "uid": 1000,
  "gid": 1000,
  "block-size": 4096,
  "size": 17573,
  "blocks": 40,
  "ctime": "2017-05-05T15:17:12Z",
  "atime": "2017-05-05T15:22:55Z",
  "mtime": "2017-05-05T15:17:12Z"
}

About

coreutils generating JSON instead of human readable output

License:GNU General Public License v3.0


Languages

Language:C 96.1%Language:Makefile 3.9%