2

I have a directory with a huge number of large files, several hundred gigabytes. I want a JSON file containing the filenames of all said files. Some of these files are in folders. I would appreciate some help in figuring out the fastest way to do so.

1 Answers1

2
tree -J > output.json

is one of the fastest ways to create a JSON file containing all the file names in a directory.

From man tree:

-J

Turn on JSON output. Outputs the directory tree as an JSON formatted array.

Raffa
  • 32,237