QA Graphic

Creating Sequential Directories

Tips on creating multiple directories in Terminal

There's an easy way to create a number sequence directories. This is useful when your creating directories for days of a month. I did this for a while organizing blog postings.

To create ten directories starting with the number 21:

mkdir {21..31}

If you need to create a directory with a leading zero:

mkdir $(printf "%02i " $(seq 1 20))

To do a directory in this format: MM-DD Simple use this:

mkdir $(date '%b-%d')

Hope this gives people ideas on different ways to create directories.

 

Comments

Add Comments

Name:
Comment:

 

About

As someone who has worked on Macs since 1989, I will use my experience to share tips and tricks with you on Fridays. As a Mac user since 1989, I have seen the evolution of Mac software and hardware, and I know how Mac computers work. I also know how to troubleshoot and fix Mac problems that can arise.

Schedule

ThursdayPython
FridayMacintosh
SaturdayInternet Tools
SundayOpen Topic
Monday Media Monday
TuesdayQA
WednesdaySnagIt for QA