wget stops downloading: Cannot write to `-' (success)

16,761

Solution 1

When you use - as the parameter of the option -O it represent the standard output.

You are using a pipeline so both commands are executed in parallel and the standard input of the tar command is bound to the standard output of the wget command.

The tar command is broking the pipeline so wget can not write to standard output.

When this happens, check the error messages before Cannot write to (backtick)- (Success). You might see there the cause of the error of the second command.

Solution 2

First of a brief breakdown of the command you're using.

cd ~ - will descend you to your "home" directory (~ is a variable)

wget -O - will download the file

tar -zxf - will unpack downloaded file

Try the step-by-step approach. In terminal type following:

    1. cd ~ and type pwd (your location should be something like /home/username)
    1. wget https://dl.dropboxusercontent.com/u/17/dropbox-lnx.x86_64-2.10.52.tar.gz (Notice I included the full path to the file, unlike yours in the description)
    1. tar xzf dropbox-lnx.x86_64-2.10.52.tar.gz

TIP: To test if you have write permissions on a specific folder, simply "cd" to that folder and type: "touch test". If you have write permissions it should create an empty file called test in that folder

Hope this helps

Cheers! Deeh

Share:
16,761

Related videos on Youtube

DCV_Diego
Author by

DCV_Diego

I am currently working on a Social Network, I am also willing to help anyone with CSS, HTML, PHP, SQL, JS, jQuery, and a bit of Objective-C, AJAX & Python (still learning :D). <style> color: #duh; </style> :D

Updated on September 18, 2022

Comments

  • DCV_Diego
    DCV_Diego over 1 year

    Please have in mind that I don't know anything about servers, nor any of its vocabulary, I am a simple web coder, trying to figure my way on the universe.

    I'm trying to link dropbox on my server, I am using this line of code:

    cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
    

    When I run it, it shows me the error:

    Cannot write to `-' (Success).
    

    I am puzzled and I don't know what to do. My CentOS is 64 bit, version 6.5.

    • Andreas F
      Andreas F over 9 years
      Do you have write permissions to the ~ directory? Does touch foo give you an error?
    • DCV_Diego
      DCV_Diego over 9 years
      as I've said, I don't know anything about servers, can you please be more specific?
    • Andreas F
      Andreas F over 9 years
      Learing how CentOS works and specifically how file permissions work would be a good starting point. Good luck.