GithubHelp home page GithubHelp logo

list_files_json's Introduction

Listing files to JSON output

Usage: list_files_json.py -p PATH -m MASK (pattern for search files default: all) -i INDEX (index of array)

Examples: list_files_json.py -p /home/sach3000/arch -m "Youfile*gz;Myfile*gz"

[
  {
    "name": "Youfile11.gz",
    "path": "/home/sach3000/arch/1/Youfile11.gz",
    "size": 554009693,
    "atime": "2022-06-24 02:35:47",
    "mtime": "2022-06-24 02:35:17",
    "ctime": "2022-06-24 02:35:47",
    "ats": 1656016547,
    "owner": "sach3000",
    "group": "sach3000"
  },
  {
    "name": "Youfile12.gz",
    "path": "/home/sach3000/arch/2/Youfile12.gz",
    "size": 554009693,
    "atime": "2022-06-25 02:35:47",
    "mtime": "2022-06-25 02:35:17",
    "ctime": "2022-06-25 02:35:47",
    "ats": 1656016547,
    "owner": "sach3000",
    "group": "sach3000"
  },
  {
    "name": "Myfile12.gz",
    "path": "/home/sach3000/arch/1/Myfile12.gz",
    "size": 3007,
    "atime": "2022-06-24 02:37:38",
    "mtime": "2022-06-24 02:35:34",
    "ctime": "2022-06-24 02:37:38",
    "ats": 1656016658,
    "owner": "sach3000",
    "group": "sach3000"
  }
]

list_files_json.py -p /home/sach3000/arch -m "Youfile*gz" -i -1

[
  {
    "name": "Youfile12.gz",
    "path": "/home/sach3000/arch/2/Youfile12.gz",
    "size": 554009693,
    "atime": "2022-06-25 02:35:47",
    "mtime": "2022-06-25 02:35:17",
    "ctime": "2022-06-25 02:35:47",
    "ats": 1656016547,
    "owner": "sach3000",
    "group": "sach3000"
  }
]

Requirements: Python > 3.6

list_files_json's People

Contributors

sach3000 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.