Selection of utilities

cuniq – count unique lines in text input

cuniq is a command-line utility written in Rust for counting unique lines in text input.

It’s designed as a faster alternative to common shell pipelines used for line cardinality and duplicate counting, and it can work with stdin or one or more files. Alongside exact counting, the project also provides faster near-exact and estimated modes for large datasets, plus optional reporting features when you need occurrence counts for each distinct line.

This is free and open source software.

Key Features

  • Counts unique lines from standard input or one or more files.
  • Supports multithreaded processing.
  • Can generate occurrence reports for each distinct line with the report option.
  • Includes exact, near-exact, and estimated counting modes for different speed and accuracy trade-offs.
  • Can sort report output alphabetically when required.
  • Offers optional tuning such as hash-table sizing, thread control, and memory-mapped file reading.

Website: https://github.com/zkxs/cuniq
Support:
Developer: zkxs
License: GNU General Public License v3.0

cuniq options

cuniq is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Alternatives to uniq
runiqAn efficient way to filter duplicate lines from input, à la uniq
huniqRemoves duplicates from stdin using a hash table
nauniqNon-adjacent uniq
semiuniqRemoves nearby repeated lines in a file
uqRemoves duplicate lines from the output, regardless of the order
zetPerform set operations on files considered as sets of lines
anewAdds new lines to files, skipping duplicates
anewerAppends lines from stdin to a file if they don't already exist in the file

Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments