0

Need help with Unix script.

how do you use /bin/cp to copy files from /somepath/somedir/somewhere/.temp_folder to /somepath/somedir/somewhere/

my line

/bin/cp -r somepath/somedir/somewhere/.[!.]* somepath/somedir/somewhere/

the directory .temp_folder Is copied but I want to copy only files

tia!

1 Answer 1

0

find <path> -type f -exec cp {} <destination path> \;

this will copy only files, overwrite files with identical names, and you won't have source directory tree in the destination directory.

Not the answer you're looking for? Browse other questions tagged .