How to create file with today date appending in Linux

In this article, we will see how to create file with today date appending in Linux. We can create files using different commands like cat, vi, touch,.. by appending date command with format settings.

Create file with today date appending in Linux:
Note: IN following examples, After date keyword and before + symbol there is space
1. Create a log file by appending day of month day of week and year.

touch logfile_$(date +%d%m%Y).log

How to create file with today date appending in Linux

2. Create a file in Linux with today date only.

touch logfile_$(date +%F).log

3. Create file with date and time in Linux.

touch logfile_$(date +%d%m%Y%H%M%S).log

So in this article, we have seen different methods to create a file in Linux wit today date or current date.