What does the hyphen “-” mean in “tar xzf -”?What is the difference between cat and tee?What does “%U” mean when calling a command?Can someone spell out what this wget command to install Heroku toolbelt does?Trying to figure out what the command meanWhat does 'ls -la' do?What does the “apt-get dselect-upgrade” command do?Adding the tar '-z' (gzip) parameter at the end of 'tar -cvpfz …' doesn't work as expectedWhy am I not being able to tar /opt and move it to my USB location in LinuxWhat does this command mean: awk -F'/BaseCalls/' 'print $2'?curl, sh, what do those commands mean?Metadata in the tar file

Should I share with a new service provider a bill from its competitor?

Can 'leave' mean 'forget'?

Mean Value Theorem: Continuous or Defined?

Golf the smallest circle!

Are there any features that help with the roll to avoid the destruction of a Wand of Fireballs when using the last charge?

How did researchers use to find articles before the Internet and the computer era?

Why don't all electrons contribute to total orbital angular momentum of an atom?

Can a single server be associated with multiple domains?

Different budgets within roommate group

What's the safest way to inform a new user of their password on my web site?

Symbol for "not absolutely continuous" in Latex

Why do I need two parameters in an HTTP parameter pollution attack?

cannot execute script while its permission is 'x'

How was film developed in the late 1920s?

How is this practical and ancient scene shot?

Was it really unprofessional of me to leave without asking for a raise first?

Details of video memory access arbitration in Space Invaders

Is it bad to describe a character long after their introduction?

Meaning of もてり and use of が

What are good ways to spray paint a QR code on a footpath?

When are digital copies of Switch games made available to play?

In native German words, is Q always followed by U, as in English?

Why was Mal so quick to drop Bester in favour of Kaylee?

Understanding Lasso Regression's sparsity geometrically



What does the hyphen “-” mean in “tar xzf -”?


What is the difference between cat and tee?What does “%U” mean when calling a command?Can someone spell out what this wget command to install Heroku toolbelt does?Trying to figure out what the command meanWhat does 'ls -la' do?What does the “apt-get dselect-upgrade” command do?Adding the tar '-z' (gzip) parameter at the end of 'tar -cvpfz …' doesn't work as expectedWhy am I not being able to tar /opt and move it to my USB location in LinuxWhat does this command mean: awk -F'/BaseCalls/' 'print $2'?curl, sh, what do those commands mean?Metadata in the tar file






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








22















When try to install dropbox from command line, I read the commands



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


what does - mean here? is it previous directory?










share|improve this question



















  • 9





    A bit of pedantry: the option you're asking about is f -. This might make finding the answer in the man pages a little easier.

    – studog
    Jun 18 at 19:01






  • 4





    It would be really helpful if you could explain what, precisely is unclear to you about the documentation of wget and tar. That way, the respective developers can improve their documentation so that future users don't stumble over the same problems again. In other words: be a hero and make the world a better place!

    – Jörg W Mittag
    Jun 18 at 20:07






  • 2





    It would be a nice default for tar to use stdin, but since it’s heritage is to work with tapes it did not do that. Instead it learned how to work with files (with the f option) and then follows the convention to have a - in place of the filename for stdin (In case of eXtract or stdout in case of Create)

    – eckes
    Jun 19 at 1:44






  • 1





    @eckes In the case of GNU tar, stdin is the default unless $TAPE is set.

    – chrylis
    Jun 20 at 6:17

















22















When try to install dropbox from command line, I read the commands



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


what does - mean here? is it previous directory?










share|improve this question



















  • 9





    A bit of pedantry: the option you're asking about is f -. This might make finding the answer in the man pages a little easier.

    – studog
    Jun 18 at 19:01






  • 4





    It would be really helpful if you could explain what, precisely is unclear to you about the documentation of wget and tar. That way, the respective developers can improve their documentation so that future users don't stumble over the same problems again. In other words: be a hero and make the world a better place!

    – Jörg W Mittag
    Jun 18 at 20:07






  • 2





    It would be a nice default for tar to use stdin, but since it’s heritage is to work with tapes it did not do that. Instead it learned how to work with files (with the f option) and then follows the convention to have a - in place of the filename for stdin (In case of eXtract or stdout in case of Create)

    – eckes
    Jun 19 at 1:44






  • 1





    @eckes In the case of GNU tar, stdin is the default unless $TAPE is set.

    – chrylis
    Jun 20 at 6:17













22












22








22


2






When try to install dropbox from command line, I read the commands



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


what does - mean here? is it previous directory?










share|improve this question
















When try to install dropbox from command line, I read the commands



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


what does - mean here? is it previous directory?







command-line tar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 19 at 19:25









Eliah Kagan

85.4k22 gold badges239 silver badges380 bronze badges




85.4k22 gold badges239 silver badges380 bronze badges










asked Jun 18 at 6:55









DummyHeadDummyHead

7034 silver badges20 bronze badges




7034 silver badges20 bronze badges







  • 9





    A bit of pedantry: the option you're asking about is f -. This might make finding the answer in the man pages a little easier.

    – studog
    Jun 18 at 19:01






  • 4





    It would be really helpful if you could explain what, precisely is unclear to you about the documentation of wget and tar. That way, the respective developers can improve their documentation so that future users don't stumble over the same problems again. In other words: be a hero and make the world a better place!

    – Jörg W Mittag
    Jun 18 at 20:07






  • 2





    It would be a nice default for tar to use stdin, but since it’s heritage is to work with tapes it did not do that. Instead it learned how to work with files (with the f option) and then follows the convention to have a - in place of the filename for stdin (In case of eXtract or stdout in case of Create)

    – eckes
    Jun 19 at 1:44






  • 1





    @eckes In the case of GNU tar, stdin is the default unless $TAPE is set.

    – chrylis
    Jun 20 at 6:17












  • 9





    A bit of pedantry: the option you're asking about is f -. This might make finding the answer in the man pages a little easier.

    – studog
    Jun 18 at 19:01






  • 4





    It would be really helpful if you could explain what, precisely is unclear to you about the documentation of wget and tar. That way, the respective developers can improve their documentation so that future users don't stumble over the same problems again. In other words: be a hero and make the world a better place!

    – Jörg W Mittag
    Jun 18 at 20:07






  • 2





    It would be a nice default for tar to use stdin, but since it’s heritage is to work with tapes it did not do that. Instead it learned how to work with files (with the f option) and then follows the convention to have a - in place of the filename for stdin (In case of eXtract or stdout in case of Create)

    – eckes
    Jun 19 at 1:44






  • 1





    @eckes In the case of GNU tar, stdin is the default unless $TAPE is set.

    – chrylis
    Jun 20 at 6:17







9




9





A bit of pedantry: the option you're asking about is f -. This might make finding the answer in the man pages a little easier.

– studog
Jun 18 at 19:01





A bit of pedantry: the option you're asking about is f -. This might make finding the answer in the man pages a little easier.

– studog
Jun 18 at 19:01




4




4





It would be really helpful if you could explain what, precisely is unclear to you about the documentation of wget and tar. That way, the respective developers can improve their documentation so that future users don't stumble over the same problems again. In other words: be a hero and make the world a better place!

– Jörg W Mittag
Jun 18 at 20:07





It would be really helpful if you could explain what, precisely is unclear to you about the documentation of wget and tar. That way, the respective developers can improve their documentation so that future users don't stumble over the same problems again. In other words: be a hero and make the world a better place!

– Jörg W Mittag
Jun 18 at 20:07




2




2





It would be a nice default for tar to use stdin, but since it’s heritage is to work with tapes it did not do that. Instead it learned how to work with files (with the f option) and then follows the convention to have a - in place of the filename for stdin (In case of eXtract or stdout in case of Create)

– eckes
Jun 19 at 1:44





It would be a nice default for tar to use stdin, but since it’s heritage is to work with tapes it did not do that. Instead it learned how to work with files (with the f option) and then follows the convention to have a - in place of the filename for stdin (In case of eXtract or stdout in case of Create)

– eckes
Jun 19 at 1:44




1




1





@eckes In the case of GNU tar, stdin is the default unless $TAPE is set.

– chrylis
Jun 20 at 6:17





@eckes In the case of GNU tar, stdin is the default unless $TAPE is set.

– chrylis
Jun 20 at 6:17










3 Answers
3






active

oldest

votes


















40














Some commands accept - in place of a filename, either:



  • To write to standard output instead of to a named file. This is what the - argument passed to wget after -O is doing.

  • To read from standard input instead of from a named file. This is what the - argument passed to tar after xzf.

The command you showed downloads an archive file with wget and unpacks it with tar. To achieve this, the output of wget is piped (|) to the input of tar. This is why wget writes to standard output instead of a file and tar reads from standard input instead of a file.






share|improve this answer

























  • I'd say "most commands" rather than just "some commands". I believe it's part of the POSIX option syntax specification.

    – Barmar
    Jun 18 at 15:55






  • 2





    @Barmar Yes and no: Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.. So if - is an operand for a "file option" and it has a special meaning, then it must be that of stdin/stdout. The program is free to not treat as a special case and simply look for file -

    – Bakuriu
    Jun 19 at 19:23











  • (and typically in those cases omitting the option will be the same as using -)

    – Bakuriu
    Jun 19 at 19:24











  • @Bakuriu I don't see how that refutes what I said. I suspect most commands take filename arguments, so they're supposed to follow that guideline. But maybe I should have qualified it as "most commands that operate on files".

    – Barmar
    Jun 19 at 19:31






  • 1





    @Barmar One way to follow the guideline is to decline to treat - specially at all, treating it as a literal filename. The only way to go against the guideline is to treat - specially but with some other meaning than the ones the guideline suggests.

    – Eliah Kagan
    Jun 19 at 19:39


















12














That's just a filename that a lot of Unix programs interpret as "instead of actually opening a file, read from stdin (or write to stdout)."



That means reading from the input that gets streamed into the program; in your case, that's the output of wget.






share|improve this answer










New contributor



Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 6





    Is it really a filename, though?

    – Eric Duminil
    Jun 18 at 17:01






  • 7





    @EricDuminil It's a filename in the sense that programs accept it in some places where they would otherwise only accept filenames, but you're right that it's not really about an actual name of a file in some directory.

    – JoL
    Jun 18 at 17:55







  • 5





    @EricDuminil: In particular, for programs that follow this convention, you have to use ./- if you actually want to open a file named -.

    – Jörg W Mittag
    Jun 18 at 20:05






  • 4





    @EricDuminil In fact: yes! It names a file; in the unix sense, stdin is a file descriptor, and - is the name you supply to use that. It's not a file name from the OS's perspective, though. Only from the user perspective.

    – Marcus Müller
    Jun 19 at 6:15







  • 3





    @rexkogitans no. /dev/stdin is just a convenience file name offered by some kernel facility. There's usually no fopen("/dev/stdin", "r") happening anywhere when you write a program that chooses to use stdin; you just go ahead and use the extern FILE* stdin that your libc header provided you with; by the way, that is the integer file descriptor 0.

    – Marcus Müller
    Jun 19 at 6:46


















5














The - argument to tar specifies that the archive should be read from stdin instead of a file. From the GNU tar manual:




If you use - as an archive-name, tar reads the archive from standard input (when listing or extracting files)




Other commands have the same behavior, and it is specified by the POSIX.1-2017 standard:




Guideline 13:



For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean
only standard input (or standard output when it is clear from context
that an output file is being specified) or a file named -.







share|improve this answer








New contributor



Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1151909%2fwhat-does-the-hyphen-mean-in-tar-xzf%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    40














    Some commands accept - in place of a filename, either:



    • To write to standard output instead of to a named file. This is what the - argument passed to wget after -O is doing.

    • To read from standard input instead of from a named file. This is what the - argument passed to tar after xzf.

    The command you showed downloads an archive file with wget and unpacks it with tar. To achieve this, the output of wget is piped (|) to the input of tar. This is why wget writes to standard output instead of a file and tar reads from standard input instead of a file.






    share|improve this answer

























    • I'd say "most commands" rather than just "some commands". I believe it's part of the POSIX option syntax specification.

      – Barmar
      Jun 18 at 15:55






    • 2





      @Barmar Yes and no: Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.. So if - is an operand for a "file option" and it has a special meaning, then it must be that of stdin/stdout. The program is free to not treat as a special case and simply look for file -

      – Bakuriu
      Jun 19 at 19:23











    • (and typically in those cases omitting the option will be the same as using -)

      – Bakuriu
      Jun 19 at 19:24











    • @Bakuriu I don't see how that refutes what I said. I suspect most commands take filename arguments, so they're supposed to follow that guideline. But maybe I should have qualified it as "most commands that operate on files".

      – Barmar
      Jun 19 at 19:31






    • 1





      @Barmar One way to follow the guideline is to decline to treat - specially at all, treating it as a literal filename. The only way to go against the guideline is to treat - specially but with some other meaning than the ones the guideline suggests.

      – Eliah Kagan
      Jun 19 at 19:39















    40














    Some commands accept - in place of a filename, either:



    • To write to standard output instead of to a named file. This is what the - argument passed to wget after -O is doing.

    • To read from standard input instead of from a named file. This is what the - argument passed to tar after xzf.

    The command you showed downloads an archive file with wget and unpacks it with tar. To achieve this, the output of wget is piped (|) to the input of tar. This is why wget writes to standard output instead of a file and tar reads from standard input instead of a file.






    share|improve this answer

























    • I'd say "most commands" rather than just "some commands". I believe it's part of the POSIX option syntax specification.

      – Barmar
      Jun 18 at 15:55






    • 2





      @Barmar Yes and no: Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.. So if - is an operand for a "file option" and it has a special meaning, then it must be that of stdin/stdout. The program is free to not treat as a special case and simply look for file -

      – Bakuriu
      Jun 19 at 19:23











    • (and typically in those cases omitting the option will be the same as using -)

      – Bakuriu
      Jun 19 at 19:24











    • @Bakuriu I don't see how that refutes what I said. I suspect most commands take filename arguments, so they're supposed to follow that guideline. But maybe I should have qualified it as "most commands that operate on files".

      – Barmar
      Jun 19 at 19:31






    • 1





      @Barmar One way to follow the guideline is to decline to treat - specially at all, treating it as a literal filename. The only way to go against the guideline is to treat - specially but with some other meaning than the ones the guideline suggests.

      – Eliah Kagan
      Jun 19 at 19:39













    40












    40








    40







    Some commands accept - in place of a filename, either:



    • To write to standard output instead of to a named file. This is what the - argument passed to wget after -O is doing.

    • To read from standard input instead of from a named file. This is what the - argument passed to tar after xzf.

    The command you showed downloads an archive file with wget and unpacks it with tar. To achieve this, the output of wget is piped (|) to the input of tar. This is why wget writes to standard output instead of a file and tar reads from standard input instead of a file.






    share|improve this answer















    Some commands accept - in place of a filename, either:



    • To write to standard output instead of to a named file. This is what the - argument passed to wget after -O is doing.

    • To read from standard input instead of from a named file. This is what the - argument passed to tar after xzf.

    The command you showed downloads an archive file with wget and unpacks it with tar. To achieve this, the output of wget is piped (|) to the input of tar. This is why wget writes to standard output instead of a file and tar reads from standard input instead of a file.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jun 18 at 17:29

























    answered Jun 18 at 7:07









    Eliah KaganEliah Kagan

    85.4k22 gold badges239 silver badges380 bronze badges




    85.4k22 gold badges239 silver badges380 bronze badges












    • I'd say "most commands" rather than just "some commands". I believe it's part of the POSIX option syntax specification.

      – Barmar
      Jun 18 at 15:55






    • 2





      @Barmar Yes and no: Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.. So if - is an operand for a "file option" and it has a special meaning, then it must be that of stdin/stdout. The program is free to not treat as a special case and simply look for file -

      – Bakuriu
      Jun 19 at 19:23











    • (and typically in those cases omitting the option will be the same as using -)

      – Bakuriu
      Jun 19 at 19:24











    • @Bakuriu I don't see how that refutes what I said. I suspect most commands take filename arguments, so they're supposed to follow that guideline. But maybe I should have qualified it as "most commands that operate on files".

      – Barmar
      Jun 19 at 19:31






    • 1





      @Barmar One way to follow the guideline is to decline to treat - specially at all, treating it as a literal filename. The only way to go against the guideline is to treat - specially but with some other meaning than the ones the guideline suggests.

      – Eliah Kagan
      Jun 19 at 19:39

















    • I'd say "most commands" rather than just "some commands". I believe it's part of the POSIX option syntax specification.

      – Barmar
      Jun 18 at 15:55






    • 2





      @Barmar Yes and no: Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.. So if - is an operand for a "file option" and it has a special meaning, then it must be that of stdin/stdout. The program is free to not treat as a special case and simply look for file -

      – Bakuriu
      Jun 19 at 19:23











    • (and typically in those cases omitting the option will be the same as using -)

      – Bakuriu
      Jun 19 at 19:24











    • @Bakuriu I don't see how that refutes what I said. I suspect most commands take filename arguments, so they're supposed to follow that guideline. But maybe I should have qualified it as "most commands that operate on files".

      – Barmar
      Jun 19 at 19:31






    • 1





      @Barmar One way to follow the guideline is to decline to treat - specially at all, treating it as a literal filename. The only way to go against the guideline is to treat - specially but with some other meaning than the ones the guideline suggests.

      – Eliah Kagan
      Jun 19 at 19:39
















    I'd say "most commands" rather than just "some commands". I believe it's part of the POSIX option syntax specification.

    – Barmar
    Jun 18 at 15:55





    I'd say "most commands" rather than just "some commands". I believe it's part of the POSIX option syntax specification.

    – Barmar
    Jun 18 at 15:55




    2




    2





    @Barmar Yes and no: Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.. So if - is an operand for a "file option" and it has a special meaning, then it must be that of stdin/stdout. The program is free to not treat as a special case and simply look for file -

    – Bakuriu
    Jun 19 at 19:23





    @Barmar Yes and no: Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.. So if - is an operand for a "file option" and it has a special meaning, then it must be that of stdin/stdout. The program is free to not treat as a special case and simply look for file -

    – Bakuriu
    Jun 19 at 19:23













    (and typically in those cases omitting the option will be the same as using -)

    – Bakuriu
    Jun 19 at 19:24





    (and typically in those cases omitting the option will be the same as using -)

    – Bakuriu
    Jun 19 at 19:24













    @Bakuriu I don't see how that refutes what I said. I suspect most commands take filename arguments, so they're supposed to follow that guideline. But maybe I should have qualified it as "most commands that operate on files".

    – Barmar
    Jun 19 at 19:31





    @Bakuriu I don't see how that refutes what I said. I suspect most commands take filename arguments, so they're supposed to follow that guideline. But maybe I should have qualified it as "most commands that operate on files".

    – Barmar
    Jun 19 at 19:31




    1




    1





    @Barmar One way to follow the guideline is to decline to treat - specially at all, treating it as a literal filename. The only way to go against the guideline is to treat - specially but with some other meaning than the ones the guideline suggests.

    – Eliah Kagan
    Jun 19 at 19:39





    @Barmar One way to follow the guideline is to decline to treat - specially at all, treating it as a literal filename. The only way to go against the guideline is to treat - specially but with some other meaning than the ones the guideline suggests.

    – Eliah Kagan
    Jun 19 at 19:39













    12














    That's just a filename that a lot of Unix programs interpret as "instead of actually opening a file, read from stdin (or write to stdout)."



    That means reading from the input that gets streamed into the program; in your case, that's the output of wget.






    share|improve this answer










    New contributor



    Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.














    • 6





      Is it really a filename, though?

      – Eric Duminil
      Jun 18 at 17:01






    • 7





      @EricDuminil It's a filename in the sense that programs accept it in some places where they would otherwise only accept filenames, but you're right that it's not really about an actual name of a file in some directory.

      – JoL
      Jun 18 at 17:55







    • 5





      @EricDuminil: In particular, for programs that follow this convention, you have to use ./- if you actually want to open a file named -.

      – Jörg W Mittag
      Jun 18 at 20:05






    • 4





      @EricDuminil In fact: yes! It names a file; in the unix sense, stdin is a file descriptor, and - is the name you supply to use that. It's not a file name from the OS's perspective, though. Only from the user perspective.

      – Marcus Müller
      Jun 19 at 6:15







    • 3





      @rexkogitans no. /dev/stdin is just a convenience file name offered by some kernel facility. There's usually no fopen("/dev/stdin", "r") happening anywhere when you write a program that chooses to use stdin; you just go ahead and use the extern FILE* stdin that your libc header provided you with; by the way, that is the integer file descriptor 0.

      – Marcus Müller
      Jun 19 at 6:46















    12














    That's just a filename that a lot of Unix programs interpret as "instead of actually opening a file, read from stdin (or write to stdout)."



    That means reading from the input that gets streamed into the program; in your case, that's the output of wget.






    share|improve this answer










    New contributor



    Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.














    • 6





      Is it really a filename, though?

      – Eric Duminil
      Jun 18 at 17:01






    • 7





      @EricDuminil It's a filename in the sense that programs accept it in some places where they would otherwise only accept filenames, but you're right that it's not really about an actual name of a file in some directory.

      – JoL
      Jun 18 at 17:55







    • 5





      @EricDuminil: In particular, for programs that follow this convention, you have to use ./- if you actually want to open a file named -.

      – Jörg W Mittag
      Jun 18 at 20:05






    • 4





      @EricDuminil In fact: yes! It names a file; in the unix sense, stdin is a file descriptor, and - is the name you supply to use that. It's not a file name from the OS's perspective, though. Only from the user perspective.

      – Marcus Müller
      Jun 19 at 6:15







    • 3





      @rexkogitans no. /dev/stdin is just a convenience file name offered by some kernel facility. There's usually no fopen("/dev/stdin", "r") happening anywhere when you write a program that chooses to use stdin; you just go ahead and use the extern FILE* stdin that your libc header provided you with; by the way, that is the integer file descriptor 0.

      – Marcus Müller
      Jun 19 at 6:46













    12












    12








    12







    That's just a filename that a lot of Unix programs interpret as "instead of actually opening a file, read from stdin (or write to stdout)."



    That means reading from the input that gets streamed into the program; in your case, that's the output of wget.






    share|improve this answer










    New contributor



    Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    That's just a filename that a lot of Unix programs interpret as "instead of actually opening a file, read from stdin (or write to stdout)."



    That means reading from the input that gets streamed into the program; in your case, that's the output of wget.







    share|improve this answer










    New contributor



    Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.








    share|improve this answer



    share|improve this answer








    edited Jun 18 at 19:58









    Eliah Kagan

    85.4k22 gold badges239 silver badges380 bronze badges




    85.4k22 gold badges239 silver badges380 bronze badges






    New contributor



    Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.








    answered Jun 18 at 7:07









    Marcus MüllerMarcus Müller

    2211 silver badge5 bronze badges




    2211 silver badge5 bronze badges




    New contributor



    Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




    New contributor




    Marcus Müller is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    • 6





      Is it really a filename, though?

      – Eric Duminil
      Jun 18 at 17:01






    • 7





      @EricDuminil It's a filename in the sense that programs accept it in some places where they would otherwise only accept filenames, but you're right that it's not really about an actual name of a file in some directory.

      – JoL
      Jun 18 at 17:55







    • 5





      @EricDuminil: In particular, for programs that follow this convention, you have to use ./- if you actually want to open a file named -.

      – Jörg W Mittag
      Jun 18 at 20:05






    • 4





      @EricDuminil In fact: yes! It names a file; in the unix sense, stdin is a file descriptor, and - is the name you supply to use that. It's not a file name from the OS's perspective, though. Only from the user perspective.

      – Marcus Müller
      Jun 19 at 6:15







    • 3





      @rexkogitans no. /dev/stdin is just a convenience file name offered by some kernel facility. There's usually no fopen("/dev/stdin", "r") happening anywhere when you write a program that chooses to use stdin; you just go ahead and use the extern FILE* stdin that your libc header provided you with; by the way, that is the integer file descriptor 0.

      – Marcus Müller
      Jun 19 at 6:46












    • 6





      Is it really a filename, though?

      – Eric Duminil
      Jun 18 at 17:01






    • 7





      @EricDuminil It's a filename in the sense that programs accept it in some places where they would otherwise only accept filenames, but you're right that it's not really about an actual name of a file in some directory.

      – JoL
      Jun 18 at 17:55







    • 5





      @EricDuminil: In particular, for programs that follow this convention, you have to use ./- if you actually want to open a file named -.

      – Jörg W Mittag
      Jun 18 at 20:05






    • 4





      @EricDuminil In fact: yes! It names a file; in the unix sense, stdin is a file descriptor, and - is the name you supply to use that. It's not a file name from the OS's perspective, though. Only from the user perspective.

      – Marcus Müller
      Jun 19 at 6:15







    • 3





      @rexkogitans no. /dev/stdin is just a convenience file name offered by some kernel facility. There's usually no fopen("/dev/stdin", "r") happening anywhere when you write a program that chooses to use stdin; you just go ahead and use the extern FILE* stdin that your libc header provided you with; by the way, that is the integer file descriptor 0.

      – Marcus Müller
      Jun 19 at 6:46







    6




    6





    Is it really a filename, though?

    – Eric Duminil
    Jun 18 at 17:01





    Is it really a filename, though?

    – Eric Duminil
    Jun 18 at 17:01




    7




    7





    @EricDuminil It's a filename in the sense that programs accept it in some places where they would otherwise only accept filenames, but you're right that it's not really about an actual name of a file in some directory.

    – JoL
    Jun 18 at 17:55






    @EricDuminil It's a filename in the sense that programs accept it in some places where they would otherwise only accept filenames, but you're right that it's not really about an actual name of a file in some directory.

    – JoL
    Jun 18 at 17:55





    5




    5





    @EricDuminil: In particular, for programs that follow this convention, you have to use ./- if you actually want to open a file named -.

    – Jörg W Mittag
    Jun 18 at 20:05





    @EricDuminil: In particular, for programs that follow this convention, you have to use ./- if you actually want to open a file named -.

    – Jörg W Mittag
    Jun 18 at 20:05




    4




    4





    @EricDuminil In fact: yes! It names a file; in the unix sense, stdin is a file descriptor, and - is the name you supply to use that. It's not a file name from the OS's perspective, though. Only from the user perspective.

    – Marcus Müller
    Jun 19 at 6:15






    @EricDuminil In fact: yes! It names a file; in the unix sense, stdin is a file descriptor, and - is the name you supply to use that. It's not a file name from the OS's perspective, though. Only from the user perspective.

    – Marcus Müller
    Jun 19 at 6:15





    3




    3





    @rexkogitans no. /dev/stdin is just a convenience file name offered by some kernel facility. There's usually no fopen("/dev/stdin", "r") happening anywhere when you write a program that chooses to use stdin; you just go ahead and use the extern FILE* stdin that your libc header provided you with; by the way, that is the integer file descriptor 0.

    – Marcus Müller
    Jun 19 at 6:46





    @rexkogitans no. /dev/stdin is just a convenience file name offered by some kernel facility. There's usually no fopen("/dev/stdin", "r") happening anywhere when you write a program that chooses to use stdin; you just go ahead and use the extern FILE* stdin that your libc header provided you with; by the way, that is the integer file descriptor 0.

    – Marcus Müller
    Jun 19 at 6:46











    5














    The - argument to tar specifies that the archive should be read from stdin instead of a file. From the GNU tar manual:




    If you use - as an archive-name, tar reads the archive from standard input (when listing or extracting files)




    Other commands have the same behavior, and it is specified by the POSIX.1-2017 standard:




    Guideline 13:



    For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean
    only standard input (or standard output when it is clear from context
    that an output file is being specified) or a file named -.







    share|improve this answer








    New contributor



    Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      5














      The - argument to tar specifies that the archive should be read from stdin instead of a file. From the GNU tar manual:




      If you use - as an archive-name, tar reads the archive from standard input (when listing or extracting files)




      Other commands have the same behavior, and it is specified by the POSIX.1-2017 standard:




      Guideline 13:



      For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean
      only standard input (or standard output when it is clear from context
      that an output file is being specified) or a file named -.







      share|improve this answer








      New contributor



      Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





















        5












        5








        5







        The - argument to tar specifies that the archive should be read from stdin instead of a file. From the GNU tar manual:




        If you use - as an archive-name, tar reads the archive from standard input (when listing or extracting files)




        Other commands have the same behavior, and it is specified by the POSIX.1-2017 standard:




        Guideline 13:



        For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean
        only standard input (or standard output when it is clear from context
        that an output file is being specified) or a file named -.







        share|improve this answer








        New contributor



        Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        The - argument to tar specifies that the archive should be read from stdin instead of a file. From the GNU tar manual:




        If you use - as an archive-name, tar reads the archive from standard input (when listing or extracting files)




        Other commands have the same behavior, and it is specified by the POSIX.1-2017 standard:




        Guideline 13:



        For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean
        only standard input (or standard output when it is clear from context
        that an output file is being specified) or a file named -.








        share|improve this answer








        New contributor



        Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        share|improve this answer



        share|improve this answer






        New contributor



        Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        answered Jun 18 at 22:01









        TimTim

        1512 bronze badges




        1512 bronze badges




        New contributor



        Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.




        New contributor




        Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1151909%2fwhat-does-the-hyphen-mean-in-tar-xzf%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

            Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?