Why not just use the cp command and exclude the …

Friday, 29th March 2024

Comment on How to exclude files on copy (cp) on GNU / Linux / Linux copy and exclude files and directories (cp -r) exclusion by Morten Pedersen.

Why not just use the cp command and exclude the “logs” subdirectory like this:

cp -rpf /usr/local/nginx/!(logs) /usr/local/nginx-bak

Share this on:

Comments are closed.