0

I want to copy all files to a directory except a few files. Is there any way to specify that information in the cp command?

Directory structure -

Dir
     Dir 1
     Dir 2 -> Dir 2.1 -> file

I want to copy the entire dir directory except file.

  • [How to use 'cp' command to exclude a specific directory?](http://stackoverflow.com/q/4585929/3776858) – Cyrus Nov 26 '16 at 19:55

1 Answers1

0

Maybe rsync

rsync -av --exclude='path1/to/exclude' --exclude='path2/to/exclude' source destination
justaguy
  • 2,908
  • 4
  • 17
  • 36