Bash Shell - how to create multiple folders ?

Description: 

How may I create multiple folders using Linux command line ?

I would like to create 1000 folders using following name convention:

folder0-1000

so in the final I would like to have something like this:

  1. [tom @localhost test]$ ll
  2. total 20
  3. drwxrwxr-x. 2 tom tom 4096 Dec 7 15:28 folder0
  4. drwxrwxr-x. 2 tom tom 4096 Dec 7 15:28 folder1
  5. drwxrwxr-x. 2 tom tom 4096 Dec 7 15:28 folder2
  6. drwxrwxr-x. 2 tom tom 4096 Dec 7 15:28 folder3
  7. drwxrwxr-x. 2 tom tom 4096 Dec 7 15:28 folder4

Could You please help me to solve it ?

Comments

Thomas (not verified)

This is very easy in Bash. You can simply execute following command:

  1. mkdir test_folder{0..10}

The output of this command should be similar to this. You just create 10 folders. To create more simply change {0..10} to something else, for example 1000.

  1. [thomas @localhost test]$ ls
  2. test_folder0 test_folder2 test_folder5 test_folder8
  3. test_folder1 test_folder3 test_folder6 test_folder9
  4. test_folder10 test_folder4 test_folder7
  5. [thomas @localhost test]$

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Fill in the blank.