Is there a BASH command for replicating all documents from a directory site tree and also placing all the documents in a solitary directory site?

I have a lots of notes classified right into folders, yet I assume it could be far better to place them all right into one folder rather. Exists a very easy means to do that?

0
2019-12-02 03:11:24
Source Share
Answers: 2
find . -type f -execdir mv {} /my/dest/path/ \;

Warning

if you have documents name clashes this will certainly shed several of the documents with duplicated names.
0
2019-12-03 05:06:00
Source
$ set globstar
$ cp /source/dir/**/* /destination/dir/

The first line makes it possible for the recursive ** globbing in Bash (not essential in Zsh).

0
2019-12-03 05:04:33
Source