Skip to content

redwil/ua

 
 

Repository files navigation

WHAT:   
=====

ua finds sets of files which are identical and kua finds files which
are identical to the given file.

LICENSE:
=======

Mozilla  Public  License, http://www.mozilla.org/MPL/
Also see the copyright notes in the source files.

BUILD:
======

This project supports both autotools and CMake build systems.

AUTOTOOLS (Traditional):
-----------------------

  $ sh autogen.sh CFLAGS= CXXFLAGS=-O3
  $ make
  $ sudo make install

Or use the convenience build script:
  $ ./build.sh autotools

CMAKE (Modern):
---------------

  $ mkdir build && cd build
  $ cmake ..
  $ make
  $ sudo make install

Or use the convenience build script:
  $ ./build.sh cmake

BUILD SCRIPT:
-------------

The project includes a convenient build script that supports both systems:

  $ ./build.sh                    # Build with autotools (default)
  $ ./build.sh cmake              # Build with CMake
  $ ./build.sh -c autotools       # Clean and build with autotools
  $ ./build.sh -j4 cmake          # Build with CMake using 4 jobs
  $ ./build.sh --help             # Show all options

RELEASE TARBALLS:
=================

Create a tarball for GitHub Releases after building:

  $ ./build.sh cmake                                   # or autotools
  $ ./scripts/make-release-tarball.sh --version v1.0.0

The archive (ua-<version>-<os>-<arch>.tar.gz) is written to dist/ and contains
an install-ready layout:

  usr/bin/ua
  usr/bin/kua
  usr/share/man/man1/{ua.1,kua.1}
  usr/share/doc/ua/{README,NEWS,ChangeLog,AUTHORS,COPYING,INSTALL}

The tarball helper will fail if the requested version differs from the
version embedded in the code (__UA_VERSION), to keep tags/releases in sync.
Use --allow-mismatch to override (not recommended).

PROJECT STRUCTURE:
==================

  src/           - Source files (*.cc, *.c, *.h)
  build/         - Build artifacts (object files, binaries)
  man/man1/      - Man pages (ua.1, kua.1)
  CMakeLists.txt - CMake build configuration
  Makefile.am    - Autotools build configuration

HASH ALGORITHMS:
================

The tool supports multiple hash algorithms via the -a option:

  $ ua -a md5     # MD5 (default)
  $ ua -a sha1    # SHA1
  $ ua -a sha256  # SHA256
  $ ua -a b3      # BLAKE3 (fast, secure)
  $ ua -a xxh64   # xxHash64 (very fast)

NEW FEATURES:
=============

- Multiple hash algorithms (MD5, SHA1, SHA256, BLAKE3, xxHash64)
- BLAKE3 SIMD optimizations (SSE2, SSE4.1, AVX2, AVX512)
- Quote file names with -q option
- Modern project structure with src/ and build/ directories
- Dual build system support (autotools + CMake)

FILES:
======

  src/filei.h:   header with class and function definitions, can be used
                 in other tools

  src/filei.cc:  implementation of stuff defined in filei.h, can be included
                 in both static and dynamic libraries

  src/ua.cc:     main of ua
  
  src/kua.cc:    main of kua

  man/man1/ua.1: man page for ua
  man/man1/kua.1: man page for kua


DOCUMENTATION:
==============

  src/filei.h extensively documents the interface. Sparse comments in the cc
  files help in understanding the code.


USAGE:
======

   After install, see the man page, 

   $ man ua
   $ man kua

   Or read the online help

   $ ua -vh
   $ kua -vh

   Examples:
   $ ua -a b3 *                    # Find duplicates using BLAKE3
   $ kua -f file.txt -a xxh64 *    # Find files identical to file.txt using xxHash64
   $ ua -q -a sha256 *             # Quote file names and use SHA256

About

ua finds sets of files which are identical

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 65.0%
  • C 32.6%
  • Shell 1.7%
  • Other 0.7%