Code Monkey home page Code Monkey logo

Comments (3)

jcmcken avatar jcmcken commented on July 29, 2024

pscp just calls scp behind the scenes, and it looks like scp will autoclobber files by default (on my CentOS 6 machine, anyways, there is no -f option to scp). If your machines have an alternate implementation of scp, let me know, and I'll reopen.

from parallel-ssh.

ck-on avatar ck-on commented on July 29, 2024

Thanks for looking at this.
Let me give you a realworld example where cp -f works but apparent pscp / scp does not.

It is possible to replace an nginx binary on a live running server and then just send a USR2 signal for it to gracefully reload itself without connections lost, ie.

cp -f objs/nginx /usr/local/sbin/nginx && kill -USR2 cat /var/run/nginx.pid

It's not possible to do this via pscp
Instead I get [FAILURE] Exited with error code 1 unless I stop nginx first.

Since scp doesn't have -f natively, perhaps it is possible to emulate it by forcefully removing the destination first before copying it.

I guess I can do that by first running a pssh command to forcefully remove the binary via rm -rf and then do the copy but it would be nice if the -f existed by emulation so it could be done almost in place as quickly as possible.

from man cp
-f, --force if an existing destination file cannot be opened, remove it and try again

from parallel-ssh.

jcmcken avatar jcmcken commented on July 29, 2024

Does a straight scp do the right thing for you? If not, that's what you need to troubleshoot.

If that does work, then I'm going to need the exact pscp command you're running (feel free to sanitize hostnames/IPs) and some information about what Linux distro you're using and which version of OpenSSH.

from parallel-ssh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.