Ubuntu Create Folder as Date Name

Ubuntu Create Folder as Date Name 

To create a folder with the current date as its name on Ubuntu, you can use the mkdir command along with the date command substitution. Here's how you can do it:

Open a terminal and type the following command:

mkdir "$(date +'%Y-%m-%d')"

This command uses the date command with the +%Y-%m-%d format specifier to get the current date in the "YYYY-MM-DD" format. The mkdir command then creates a folder with the name as the current date.

For example, if today's date is July 31, 2023, running this command will create a folder named "2023-07-31".

mkdir-command




Previous Post Next Post

Ads

Ads