E
E
Emmet12020-05-31 03:41:02
ubuntu
Emmet1, 2020-05-31 03:41:02

How to place 1000 directories on the server?

There is a task, on the server to create about 1000 directories
Server on ubuntu.

It is not very convenient to do it manually through ISPmanager.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2020-05-31
@Emmet1

In Python, creates 1000 folders named dir1...dir1000:

import os

for i in range(1000):
  os.mkdir("dir{}".format(i+1))

If the hosting is homeless and does not provide anything other than PHP, then you can also use PHP:
for ($i = 1; $i <= 1000; $i++)
  mkdir('dir' . $i);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question