Basic Usage
Quick Start
Here are some common use cases to get you started quickly:
1. Basic Directory Scan
Generate a hash report for all files in a directory:
2. Scan with Specific Hash Algorithm
Use SHA-256 for better security:
3. Filter by File Type
Scan only PDF files:
4. Generate Multiple Formats
Create both CSV and JSON reports:
Command Structure
The basic command structure is:
Core Commands
Scanning a Directory
To scan a directory and generate a hash report:
Choosing Hash Algorithm
You can specify which hash algorithm to use:
To see available hash 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:
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:
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 old_report.csv new_report.csv
# Save comparison results
hashreport compare old_report.csv new_report.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)
Configuration Management
hashreport settings can be managed using the config
command:
View Settings
Display current configuration:
Edit Settings
Open settings in your default text editor:
The editor used is determined by: 1. $VISUAL environment variable 2. $EDITOR environment variable 3. Platform default (vi/vim on Unix, notepad on Windows)
Settings are automatically validated when saved.
Getting Help
For detailed information about available options:
Related Topics
Advanced Features
- Resource Management - Optimize memory and thread usage
- Email Notifications - Send reports via email
- Pattern Matching - Advanced file filtering options
- Report Generation - Customize report formats and behavior
- Report Comparison - Advanced comparison features
Additional Resources
- Command Reference - Detailed command documentation
- Configuration Guide - Customize hashreport settings
- Troubleshooting - Common issues and solutions