Directory Sync & Conflict Logger
A Bash script that uses rsync to mirror two directories, detects conflicting file changes by comparing checksums and timestamps, and writes a structured log of every sync action and conflict. Learners practice rsync flags, checksum comparison with sha256sum, and structured logging patterns in shell scripts.
- Estimate
- ~7h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
rsync · sha256sum · cron
Project roadmap
- 01
Set up test directory pairs
~0.5hCreate source and destination directories with sample files, including some that differ, to test sync behavior against.
- 02
Write the basic rsync wrapper
~1.5hWrite a script that calls rsync with -av flags to mirror source into destination and captures its output.
- 03
Add checksum-based conflict detection
~2hBefore syncing, compare sha256sum of files that exist in both locations and flag ones that differ without a clear newer version.
- 04
Implement structured logging
~1.5hRedirect all sync actions and conflicts to a timestamped log file using a consistent format (date, action, file, result).
- 05
Add a cron-friendly summary mode
~1.5hAdd a --summary flag that prints a digest of conflicts found, suitable for a nightly cron job.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack