How to use ‘cp’ command to exclude a specific directory?

I want to copy all files in a directory except some files in a specific sub-directory. I have noticed that cp command didn’t have the –exclude option. So, how can I achieve this? 19 s 19 rsync is fast and easy: rsync -av –progress sourcefolder /destinationfolder –exclude thefoldertoexclude You can use –exclude multiples times. rsync … Read more

How do I copy folder with files to another folder in Unix/Linux? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 9 years ago. Improve this question I am having some issues to copy a folder with files in that folder into another folder. Command cp -r doesn’t copy files … Read more