Support multiple file/directory arguments for all commands

- Change sum add, sum update, check, and clear to accept 1+ paths
- Update README usage examples to show multiple path support
- Add TODO section with planned future improvements
This commit is contained in:
2026-02-01 03:21:36 -08:00
parent 9ad48fb9b0
commit c856ea25be
2 changed files with 61 additions and 18 deletions

View File

@@ -31,20 +31,20 @@ Semantic Versioning 2.0.0 is used for tags.
## Usage
```bash
# add checksum & timestamp xattrs to every regular file under DIR
attrsum sum add DIR
# add checksum & timestamp xattrs to every regular file under one or more paths
attrsum sum add DIR1 DIR2 file.txt
# update checksum only when file mtime is newer than stored sumtime
attrsum sum update DIR
attrsum sum update DIR1 DIR2
# verify checksums, stop on first error
attrsum check DIR
attrsum check DIR1 DIR2
# verify every file, reporting each result, keep going after errors
attrsum -v check --continue DIR
attrsum -v check --continue DIR1 DIR2
# remove checksum & timestamp xattrs
attrsum clear DIR
attrsum clear DIR1 DIR2
```
| xattr key | meaning |
@@ -71,6 +71,21 @@ required. Now you can trust a USB stick didn't eat your data.
---
## TODO
Future improvements under consideration:
- **Quiet mode (`-q`)** — suppress all output except errors
- **Dry-run mode (`--dry-run`, `-n`)** — show what would be done without making changes
- **JSON output (`--json`)** — machine-readable output for scripting and integration
- **Parallel processing (`-j N`)** — use multiple goroutines for faster checksumming on large trees
- **Progress indicator** — show progress bar or spinner for long-running operations
- **Summary report** — print statistics on completion (files processed, errors, bytes hashed)
- **Read paths from stdin (`-`)** — support piping file lists, e.g. `find ... | attrsum sum add -`
- **Exit code documentation** — formalize and document exit codes for scripting
---
## Contributing
* Author & maintainer: **sneak** <sneak@sneak.berlin>