Creating multiple folders with unique names in Linux

Creating multiple folders with unique names in Linux

First of all, we need to specify the folder names to be created for the TXT content, you can apply this process with the 'nano create.txt' command.

create.txt file content

cXwVoJsQw1

OkeZksjyEb

0H5LIyNBLz

k1UMrIAJgx

w3hymAj9gx

After adding the names of the folders to be created in TXT, it remains to run the command.

There is one thing you should keep in mind before running this command.

If only the names of the folders to be created are added to the TXT file, the folders will be created on the current directory.

In addition, if you want the folders to be created in the X directory, you must enter the directory you want to create in front of the folder names.

Example: /var/www/random-folder-name/

The command to be applied;

xargs -I {} mkdir -p "{}" < create.txt