Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piotrpsz/dirscanner
https://github.com/piotrpsz/dirscanner
cpp cpp20 tbb
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/piotrpsz/dirscanner
- Owner: piotrpsz
- License: mit
- Created: 2023-11-14T10:05:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-26T11:49:10.000Z (about 1 year ago)
- Last Synced: 2023-11-26T12:30:46.215Z (about 1 year ago)
- Topics: cpp, cpp20, tbb
- Language: C++
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dirscanner
Disk search program. Searches for directories and files with the specified name,
files containing the specified text. Name and text searches are performed using regular expressions.Scanning of individual directories and subdirectories is performed in parallel using the TBB library.
Each directory is scanned in dedicated tasks (not a posix thread).
Tasks are intelligently allocated to individual threads by the scheduler in TBB.
Posix threads are also created and managed by the TBB library.The linear clean disk scan (without checking anything) of my whole disk
(over a million directories, almost seven million files) takes:
```
execution time: 218.10626712500002s
```
Parallel scanning (in dedicated tbb-tasks) takes:
```
execution time: 45.249340667000006s
```
(Of course, results will be different on different computers.)To install the TBB library on macOS:
- brew update
- brew install tbb
I use two of my libraries in the program: 'share' and 'clap'.
To add them to your project you need to add them as submodules (when git is already initialized in your project):
- git submodule add https://github.com/piotrpsz/share.git
- git submodule add https://github.com/piotrpsz/clap.git
The program runs on macOS and should run on Linux. It almost certainly doesn't work on Windows.
## Example of use
./dirscanner -wq --dir '/Users/piotr' --text 'filesystem' -e 'cpp|h'
For more information on passing parameters to the program, see my 'clap' library.