OlveraeUNSW
Back to problems
COMP2041

21T2 Q11 — Compare two directory trees

Args: two directory pathnames. Print one line with 4 integers:

  1. files at the same relative path in both trees, same size
  2. same relative path in both, different size
  3. files only in the first tree
  4. files only in the second tree

Same relative pathname is required to be "present in both".


POSIX shell only (#!/bin/dash); standard UNIX filters; no awk, Perl, C or Python. From COMP2041/9044 21T2 Final.

Samples

stdin
expected
3 0 0 0
shell
14