nixCraft Linux / UNIX Newsletter

Link to [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format

How to exclude file when using scp command recursively

Posted: 09 Aug 2019 01:24 AM PDT


I need to copy all the *.c files from local laptop named hostA to hostB including all directories. I am using the following scp command but do not know how to exclude specific files (such as *.out):$ scp -r ~/projects/ user@hostB:/home/delta/projects/. How do I tell scp command to exclude particular file or directory at the Linux/Unix command line?

The post How to exclude file when using scp command recursively appeared first on nixCraft.