mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
0b70d2a5da
frand is a command line tool who returns a random file from a given directory using the reservoir sampling algorithm. With reservoir sampling algorithm, directory contents doesn't need to be read in memory then sorted and so will perform much better than find+sort for directories with a large amount of files. PR: 239467 Submitted by: serpent7776@gmail.com
6 lines
270 B
Plaintext
6 lines
270 B
Plaintext
Selects a random file from given directory using reservoir sampling algorithm.
|
|
This means directory contents doesn't need to be read in memory and then sorted
|
|
and so will perform much better than find+sort for big directories.
|
|
|
|
WWW: https://github.com/serpent7776/frand
|