Copy all files except from some certain folders.
At the moment I'm using:
"cp -ap . /destination-folder" to copy everything from the folder I'm in to another folder. That works. Is it possible to cp everything except: folder1/ folder2/ in the current folder I'm in? |
You need something that you can easily --exclude things with. Two tools come to mind: 'tar' and 'rsync'.
|
As implied by unSpawn, there is (unfortunately) no --exclude option for cp.
Other solutions include: 1. cp everything, then rm at the destination 2. write a short script to call cp, skipping those dirs |
All times are GMT -5. The time now is 07:24 AM. |