linux - copy all files in folder, into a folder within that same path -


in linux shell, how can copy files /folder /folder/sub?

the normal way of copying recursively isn't working (which makes sense) because i'm copying folder itself...

cp -a !(sub) sub 

you can exclude sub directory.

from comments on similar question:

if doesn't work, might need enable:

shopt -s extglob 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -