Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/catatsuy/lls
you can get a list of files in a directory that contains a large number of files
https://github.com/catatsuy/lls
Last synced: 10 days ago
JSON representation
you can get a list of files in a directory that contains a large number of files
- Host: GitHub
- URL: https://github.com/catatsuy/lls
- Owner: catatsuy
- License: mit
- Created: 2021-08-28T06:27:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T04:50:05.000Z (about 2 months ago)
- Last Synced: 2024-09-08T05:40:00.195Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 86.9 KB
- Stars: 64
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lls
The 'lls' tool is a lightweight version of the 'ls' command, which allows you to generate a list of files within a directory that has a large number of files (e.g. 30M).
## How?
To use the 'lls' tool, you need to allocate a buffer in memory for the size of the directory you want to list. You can use the 'getdents64' system call to retrieve the list of files.
The larger the directory size, the more memory will be required for the buffer. To determine the necessary amount of memory in advance, you can run the `ls -dl` command.
For additional information on using the 'lls' tool, you can refer to [this article](http://be-n.com/spw/you-can-list-a-million-files-in-a-directory-but-not-with-ls.html).
## Usage
```sh
$ lls > output.txt$ lls / > output.txt
```To adjust the memory usage of the 'lls' tool, you can use the `-buf-size` option (with a default value of 5MB). This allows you to specify the size of the buffer used to hold the list of files.