Bash - Copy files from directory -


i have folder contains folders:

main   \_ dir 1   \_ dir 2   \_ ...   \_ dir 40 

i need open each sub-folder, copy files , paste them in folder, same folder sub-folder.

how can in smart way?

the thing comes mind create list name of folders , use simple script open, copy , paste i'm sure there faster way write names.

try:

cp main/*/* /path/to/otherfolder/ 

if want warned before overwriting file, use -i option:

cp -i main/*/* /path/to/otherfolder/ 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

Delphi 7 and decode UTF-8 base64 -