Jin Lin
Jin Lin

Reputation: 303

How can I recursively copy entire directories and exclude specific files with extention "min.min.js"

I need help with bash command that recursively cp all the file or subdirectory inside but also exclude some specific file like "*.min.min.js".

Upvotes: 0

Views: 78

Answers (2)

tobe
tobe

Reputation: 21

Or use tar

tar c --exclude "*.min.min.js" source_dir | tar -C /destination xv

Upvotes: 2

konsolebox
konsolebox

Reputation: 75488

Use rsync:

rsync -av --exclude '*min.min.js' parent_dir dest_dir 

Upvotes: 2

Related Questions