#!/bin/sh if [ $# -eq 0 ] then echo "Usage: $0 DIR..." fi tmp_file="$(mktemp)" for dir in "$@" do find "$dir" -type f -fprint "$tmp_file" done cat "$tmp_file" | uniq -u | xargs -d '\\n' ftag file add