how to move bounch of files from date based directories to one folder on linux

Viewed 24

I have a bunch of directories which were organized on date.

e.g. the following directory are sequential dates. /200001 ..../200201 /200202 /200203...../202209

There are tons of files in those directories and i'd like to move those files with name "*.csv" and the directory is from 200501 to 202209 to /tmp directory.

I know the following command is wrong, but it shows what i'd like to do

mv /{200501..202209}/*.csv /tmp

How can I do it by writing a shell script? Sorry i am very new to os linux.

0 Answers
Related