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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -