H
H
h3rmantchanG2019-11-08 20:55:11
linux
h3rmantchanG, 2019-11-08 20:55:11

How to distribute files into folders in batches of 200 pieces in Linux?

There is debian.
There are 10000 files.
You need to create 50 new folders, and move these files there, 200 pieces in each folder.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
ky0, 2019-11-08
@ky0

Smoke manuals mkdir, mvand bash cycles. Or yes, by hand.

V
Victor Taran, 2019-11-08
@shambler81

By what criteria are they filtered?
How are directories created?
archive not archive?
respectively find | xargs by 200 , loop +1 to mkdir directory name

M
mayton2019, 2019-11-09
@mayton2019

Where did this specification come from? This is very similar to the mechanics of hashing files. How browsers do when saving static content. It's not hard to make bash loops. But it is much more useful to understand why the author wants it. What will happen if there are 10001 files? How to name directories?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question