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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -