Skip to content
/ lls Public

you can get a list of files in a directory that contains a large number of files

License

Notifications You must be signed in to change notification settings

catatsuy/lls

Repository files navigation

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.

Usage

$ 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.

About

you can get a list of files in a directory that contains a large number of files

Resources

License

Stars

Watchers

Forks

Packages

No packages published