Scp – skip a file while running

scp

I'm running scp and copying a folder from remote server, I'm running with -rl , so i see the files being copy, is it possible to skip current file some way?

Best Answer

No you can't. But you can stop scp and use rsync instead. It will copy only the differences left from the partial copy and you can exclude any files or dirs you don't want to transfer.

rsync -avP -e ssh --exclude=somefile --exclude=somedir ./localdir/ user@server:remotedir/