Basic Usage
Command Structure
The basic command structure is:
hashreport scan [OPTIONS] DIRECTORY
Core Commands
Scanning a Directory
To scan a directory and generate a hash report:
hashreport scan /path/to/directory
Choosing Hash Algorithm
You can specify which hash algorithm to use:
hashreport scan --algorithm sha256 /path/to/directory
To see available hash algorithms:
hashreport algorithms
Output Formats
hashreport supports CSV (default) and JSON output formats:
# Generate CSV report (default)
hashreport scan -f csv /path/to/directory
# Generate JSON report
hashreport scan -f json /path/to/directory
# Generate both formats
hashreport scan -f csv -f json /path/to/directory
Specifying Output Location
Control where reports are saved:
hashreport scan /path/to/directory -o /path/to/output/
Filtering Options
Size Filters
Filter files by size:
# Files larger than 1MB
hashreport scan --min-size 1MB /path/to/directory
# Files smaller than 1GB
hashreport scan --max-size 1GB /path/to/directory
# Files between 1MB and 1GB
hashreport scan --min-size 1MB --max-size 1GB /path/to/directory
Pattern Matching
Include or exclude files by pattern:
# Include only .txt files
hashreport scan --include "*.txt" /path/to/directory
# Exclude .tmp files
hashreport scan --exclude "*.tmp" /path/to/directory
# Use regex patterns
hashreport scan --regex --include ".*\.txt$" /path/to/directory
Processing Control
Control how files are processed:
# Limit number of files
hashreport scan --limit 100 /path/to/directory
# Disable recursive scanning
hashreport scan --no-recursive /path/to/directory
File Listing
Generate a list of files without calculating hashes:
hashreport filelist /path/to/directory
Viewing Reports
View report contents in a paginated format:
# View entire report
hashreport view hashreport_<timestamp>.csv
# Filter report entries
hashreport view hashreport_<timestamp>.csv -f "mydoc"
Comparing Reports
Compare two reports to identify changes:
# View differences between reports
hashreport compare hashreport_<old>.csv hashreport_<new>.csv
# Save comparison results
hashreport compare hashreport_<old>.csv hashreport_<new>.csv -o /path/to/output/
The comparison will show:
- Modified files (hash changed)
- Moved files (same hash, different location)
- Added files (new in second report)
- Removed files (missing in second report)
Getting Help
For detailed information about available options:
hashreport --help
hashreport scan --help