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

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -