First, the solution. A long one-liner. Making use of Python being shipped with FreeNAS: # cat .history | python -c 'from datetime import datetime as dt; import sys; lines=[l for l in sys.stdin]; chunks=[lines[i:i + 2] for i in range(0, len(lines), 2)]; [print(dt.fromtimestamp(int(time[2:])), cmd.strip()) for time, cmd in chunks]' | head -n5 2019-09-15 22:31:36 ls […]