Categories
Server

How to Append Date and Time to Log File in Linux

If we want to get detailed log report, we can store multiple log files with date and time information on the file name 🙂

We can do this command in Linux :

your_command_here > /path_1/path_2/your_log_$(date +"%Y-%m-%d_%H-%M-%S").txt