POSIXLY: f1=/path/to/file_1 f2=/path/to/file_2 if [ -n "$(find "$f1" -L -prune -newer "$f2" -exec echo . \;)" ]; then printf '%s is newer than %s\n' "$f1" "$f2" fi