Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton committed Feb 7, 2024
1 parent f4fbeea commit 16b9441
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
# dsearch
File duplicates scanner. Usage example:
``` bash
dsearch -d /home/user/docs
File duplicates scanner.
## Usage
```
dsearch [Options]
Options:
-h,--help Print this help message and exit
-d,--directory TEXT Root directory for search; default: cwd
-a,--algorithms TEXT ... Search algorithms: name, size, head, hash; default: 'name size head hash'
name - compares file name
size - compares file size
head - compares only first 4096 bytes file block
hash - compares whole file hashes
```
Example:
``` bash
dsearch -d /path/to/root -a 'name size'
```
## Info
* Contains docker file for build evironment.
* catch2 https://github.com/catchorg/Catch2
Expand Down
4 changes: 2 additions & 2 deletions cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ int main(int argc, char **argv) {

std::string directory = std::filesystem::current_path().string();
std::vector<std::string> algorithms = standardAlgorithms;
app.add_option("-d,--directory", directory);
app.add_option("-als,--algorithms", algorithms);
app.add_option("-d,--directory", directory, "Root directory for search; default: cwd");
app.add_option("-a,--algorithms", algorithms, "Search algorithms: name, size, head, hash; default: 'name size head hash'");

CLI11_PARSE(app, argc, argv);

Expand Down

0 comments on commit 16b9441

Please sign in to comment.