-1

What is the shell command to do this action.

"Copy the file https://improvement.abc.com/s3hkfiles/snbget.cgi/szubjkrgotc-xpra.repo to /etc/yujhkm.rmepos.d"

  • wget https://improvement.abc.com/s3hkfiles/snbget.cgi/szubjkrgotc-xpra.repo -P /etc/yujhkm.rmepos.d if the latter is a directory. – ridgy Feb 27 '17 at 14:05
1

You're looking for wget. Try this:

$ wget https://improvement.abc.com/s3hkfiles/snbget.cgi/szubjkrgotc-xpra.repo
  • Glad it helped. Please up-vote! – Alxs Feb 27 '17 at 14:16
  • Remember to quote the URL in single quotes, in case the URL contains characters like #. – Alexander Feb 27 '17 at 14:30
1

Curl and sudo is one possibility:

curl -O 'https://improvement.abc.com/s3hkfiles/snbget.cgi/szubjkrgotc-xpra.repo'
sudo cp -i -v szubjkrgotc-xpra.repo /etc/yujhkm.rmepos.d

Another way is to download it directly, but downloading anything as root is not recommended at all, because of possible security implications:

sudo curl -o /etc/yujhkm.rmepos.d 'https://improvement.abc.com/s3hkfiles/snbget.cgi/szubjkrgotc-xpra.repo'

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.