Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

cmp: quiet mode compares full file sizes before applying -n

Open Beginner friendly
#295 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@SichenLiang is already working on this.

Since Oct 3, 2026.

  • #296 by @SichenLiang — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start at the cmp command entry point and reproduce the reported cases with -s and -n using the shell commands in the issue. Trace how quiet mode compares file sizes versus the byte limit; done means the one-byte case exits 0 like GNU diffutils while the two-byte case still exits 1.

Written by the indexing model from the issue text.

Description

cmp -s compares the full file sizes before applying the byte limit. Two files of different sizes therefore compare unequal even when every requested byte matches.

printf a > a
printf ab > ab
/usr/bin/cmp -s -n 1 a ab; echo "GNU=$?"
diffutils cmp -s -n 1 a ab; echo "uutils=$?"

GNU diffutils 3.12 exits 0; uutils exits 1. With -n 2, both exit 1 because the shorter file ends inside the requested range.

Dominant language
Rust
Stars
276
Forks
43
Avg merge
1d 23h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/diffutils

All issues in uutils/diffutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.