N1ng N1ng - 4 months ago 26
Linux Question

Linux mkdir to make directories with serial number

In my CentOS-7, I want to create some directories with names, say name001, name002, ... name003.

How to do this without typing

mkdir name001
mkdir name002

and so on?


remove the echo, if you are happy with the output

for i in $(seq -s " " -f %03g 1 10); do echo mkdir name${i}; done