Adding Timestamps to files

Im having a little problem with Timestamps i want to timestamp a file that is being redirected by "tee" my syntax looks like this:
nmap -sL |& tee IP.log
i tried it out with "ts" like this
nmap -sL |& tee >(ts "%d-%m-%y %H_%M_%S" > IP.log)
but that didnt work is there another option?

Try with

echo $(date +%d-%m-%y_%H_%M_%S)

That worked thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by