Question: Linux / Unix: 3. Use brace expansion with the touch command in three command lines to create 365 empty files, one for each day of
Linux / Unix:
3. Use brace expansion with the touch command in three command lines to create 365 empty files, one for each day of 2021, in the format ddmmmyyyy, e.g., 25jan2021 and 02feb2021. Here's the algorithm I want you to use to solve this:
- Create one file for the 1st - 28th of each month, all in a single command.
- Create one file for the 29th and 30th of each month except February, all in a single command.
- Create one file for the 31st of each month that has 31 days.
- Use ls to display all the files.
- Display a count of all the files. (The count should obviously be 365--this command is a check to ensure that.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
