0

When I'm copying files via sftp with this command:

echo 'put -rp /home/rof/clone/dist' > put.txt
sftp -b put.txt andreyshedko@185.206.144.61:/home/andreyshedko/Applications/agroproject-api/stage/stage/

It's creating dist folder in the destination, while I need copy only dist folder content - files and children directories?

  • 2
    Add a /* after dist – Rinzwind May 10 at 16:56
1

Try echo 'put -rp /home/rof/clone/dist/*' > put.txt

This will echo al underlying directories and files If you just want files do

echo 'put -rp /home/rof/clone/dist/*.*' > put.txt

Dont mind the formatting. I'm on mobile. Lol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.