In Linux command manuals, what is the difference between having in the description a “short_option ...












3















For instance, taking a look at



man stat



in the description, there's several options like:




-L, --dereference




and




-c --format=FORMAT




what is the difference with or without a comma? And how do I learn this kind of stuff. I'm afraid I might be missing some simple detail.



I'm currently reading: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html



But it doesn't seem to say a lot. How/where do you consult information about Linux?










share|improve this question

























  • There is no difference: it's simply the style used by the documentation writer. Sometimes the short and long options are on different lines.

    – AFH
    Sep 17 '18 at 21:38
















3















For instance, taking a look at



man stat



in the description, there's several options like:




-L, --dereference




and




-c --format=FORMAT




what is the difference with or without a comma? And how do I learn this kind of stuff. I'm afraid I might be missing some simple detail.



I'm currently reading: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html



But it doesn't seem to say a lot. How/where do you consult information about Linux?










share|improve this question

























  • There is no difference: it's simply the style used by the documentation writer. Sometimes the short and long options are on different lines.

    – AFH
    Sep 17 '18 at 21:38














3












3








3








For instance, taking a look at



man stat



in the description, there's several options like:




-L, --dereference




and




-c --format=FORMAT




what is the difference with or without a comma? And how do I learn this kind of stuff. I'm afraid I might be missing some simple detail.



I'm currently reading: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html



But it doesn't seem to say a lot. How/where do you consult information about Linux?










share|improve this question
















For instance, taking a look at



man stat



in the description, there's several options like:




-L, --dereference




and




-c --format=FORMAT




what is the difference with or without a comma? And how do I learn this kind of stuff. I'm afraid I might be missing some simple detail.



I'm currently reading: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html



But it doesn't seem to say a lot. How/where do you consult information about Linux?







linux bash shell






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 17 '18 at 23:46









Paul

47.9k13121147




47.9k13121147










asked Sep 17 '18 at 21:25









Tiago OliveiraTiago Oliveira

163




163













  • There is no difference: it's simply the style used by the documentation writer. Sometimes the short and long options are on different lines.

    – AFH
    Sep 17 '18 at 21:38



















  • There is no difference: it's simply the style used by the documentation writer. Sometimes the short and long options are on different lines.

    – AFH
    Sep 17 '18 at 21:38

















There is no difference: it's simply the style used by the documentation writer. Sometimes the short and long options are on different lines.

– AFH
Sep 17 '18 at 21:38





There is no difference: it's simply the style used by the documentation writer. Sometimes the short and long options are on different lines.

– AFH
Sep 17 '18 at 21:38










2 Answers
2






active

oldest

votes


















3














In stat specifically, this looks like a typo. The -c and --format options are interchangable and so the comma should be there for style consistency with the other options.



The way it reads is that you need -c then --format which is not the case.






share|improve this answer































    3















    what is the difference with or without a comma?




    None. Use either short or long option, the comma doesn't matter.



    In my Kubuntu I copied files from /usr/share/man/man1 and /usr/share/man/man8, decompressed, sanitized (removed fluff) and searched with regex for options without the comma. I browsed the results, examined few "suspicious" files. My conclusions (heuristic, not strict):




    • Relatively few manuals use the no-comma style.

    • Those which do rarely mix it with the with-comma style.


    • man stat uses no-comma for -c --format only, it's probably just a typo.



    how do I learn this kind of stuff?




    My way: by getting familiar with. Man pages are for people; most people (even nerds) are able to deal with fuzzy patterns, typos, little inconsistencies or exceptions. Some manuals are so huge (man 1 bash) or need to deal with abstract concepts (man 5 sudoers), so they are more formal; but when you need to solve a specific problem you rarely study the whole manual, you seek examples. So you experiment, adapt available examples, write commands that don't work, write commands that do work, compare whatever works against the documentation.



    And then you start to know these somewhat fuzzy conventions. You rely on the Rule of Least Surprise, you expect to see some short options equivalent to some long options. You don't even notice some manuals omit commas. You see man stat is inconsistent only because the lacking comma stands out visually; you shrug and carry on…



    … because you're familiar with some other manuals that explicitly warn you about surprising syntax, if any; and you think it's great their authors did such a good thing.



    But even if there was a difference with or without a comma, how much can it matter? since




    • you run stat -c '%n' / and get / which is expected;

    • you run stat --format='%n' / and get the same result;


    but




    • you run stat -c --format='%n' / and get --format=/.



    I'm afraid I might be missing some simple detail.




    Compare this to the case of ellipsis in menus of GUI tools. Did you know many applications use ellipsis () to denote menu items that don't take immediate action? E.g. Print… spawns additional window where you can change something before you proceed with the actual printing, or you can cancel; in such application Print (without ellipsis) would print right away.



    I had been using GUI tools efficiently for several years, before I learnt what ellipsis mean. It was by chance, I read some trivia and only then I noticed ellipsis are (and "always" were) there. Now I know any menu item with ellipsis is "safe", it should provide me a way to cancel.



    My point is: such a detail may mean something, it may be quite useful (so you asked a reasonable question); but if you can make stat do what you want (and if I can use menus to get what I want) then missing the detail is not a big deal.






    share|improve this answer

























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      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%2fsuperuser.com%2fquestions%2f1358999%2fin-linux-command-manuals-what-is-the-difference-between-having-in-the-descripti%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      In stat specifically, this looks like a typo. The -c and --format options are interchangable and so the comma should be there for style consistency with the other options.



      The way it reads is that you need -c then --format which is not the case.






      share|improve this answer




























        3














        In stat specifically, this looks like a typo. The -c and --format options are interchangable and so the comma should be there for style consistency with the other options.



        The way it reads is that you need -c then --format which is not the case.






        share|improve this answer


























          3












          3








          3







          In stat specifically, this looks like a typo. The -c and --format options are interchangable and so the comma should be there for style consistency with the other options.



          The way it reads is that you need -c then --format which is not the case.






          share|improve this answer













          In stat specifically, this looks like a typo. The -c and --format options are interchangable and so the comma should be there for style consistency with the other options.



          The way it reads is that you need -c then --format which is not the case.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 17 '18 at 23:45









          PaulPaul

          47.9k13121147




          47.9k13121147

























              3















              what is the difference with or without a comma?




              None. Use either short or long option, the comma doesn't matter.



              In my Kubuntu I copied files from /usr/share/man/man1 and /usr/share/man/man8, decompressed, sanitized (removed fluff) and searched with regex for options without the comma. I browsed the results, examined few "suspicious" files. My conclusions (heuristic, not strict):




              • Relatively few manuals use the no-comma style.

              • Those which do rarely mix it with the with-comma style.


              • man stat uses no-comma for -c --format only, it's probably just a typo.



              how do I learn this kind of stuff?




              My way: by getting familiar with. Man pages are for people; most people (even nerds) are able to deal with fuzzy patterns, typos, little inconsistencies or exceptions. Some manuals are so huge (man 1 bash) or need to deal with abstract concepts (man 5 sudoers), so they are more formal; but when you need to solve a specific problem you rarely study the whole manual, you seek examples. So you experiment, adapt available examples, write commands that don't work, write commands that do work, compare whatever works against the documentation.



              And then you start to know these somewhat fuzzy conventions. You rely on the Rule of Least Surprise, you expect to see some short options equivalent to some long options. You don't even notice some manuals omit commas. You see man stat is inconsistent only because the lacking comma stands out visually; you shrug and carry on…



              … because you're familiar with some other manuals that explicitly warn you about surprising syntax, if any; and you think it's great their authors did such a good thing.



              But even if there was a difference with or without a comma, how much can it matter? since




              • you run stat -c '%n' / and get / which is expected;

              • you run stat --format='%n' / and get the same result;


              but




              • you run stat -c --format='%n' / and get --format=/.



              I'm afraid I might be missing some simple detail.




              Compare this to the case of ellipsis in menus of GUI tools. Did you know many applications use ellipsis () to denote menu items that don't take immediate action? E.g. Print… spawns additional window where you can change something before you proceed with the actual printing, or you can cancel; in such application Print (without ellipsis) would print right away.



              I had been using GUI tools efficiently for several years, before I learnt what ellipsis mean. It was by chance, I read some trivia and only then I noticed ellipsis are (and "always" were) there. Now I know any menu item with ellipsis is "safe", it should provide me a way to cancel.



              My point is: such a detail may mean something, it may be quite useful (so you asked a reasonable question); but if you can make stat do what you want (and if I can use menus to get what I want) then missing the detail is not a big deal.






              share|improve this answer






























                3















                what is the difference with or without a comma?




                None. Use either short or long option, the comma doesn't matter.



                In my Kubuntu I copied files from /usr/share/man/man1 and /usr/share/man/man8, decompressed, sanitized (removed fluff) and searched with regex for options without the comma. I browsed the results, examined few "suspicious" files. My conclusions (heuristic, not strict):




                • Relatively few manuals use the no-comma style.

                • Those which do rarely mix it with the with-comma style.


                • man stat uses no-comma for -c --format only, it's probably just a typo.



                how do I learn this kind of stuff?




                My way: by getting familiar with. Man pages are for people; most people (even nerds) are able to deal with fuzzy patterns, typos, little inconsistencies or exceptions. Some manuals are so huge (man 1 bash) or need to deal with abstract concepts (man 5 sudoers), so they are more formal; but when you need to solve a specific problem you rarely study the whole manual, you seek examples. So you experiment, adapt available examples, write commands that don't work, write commands that do work, compare whatever works against the documentation.



                And then you start to know these somewhat fuzzy conventions. You rely on the Rule of Least Surprise, you expect to see some short options equivalent to some long options. You don't even notice some manuals omit commas. You see man stat is inconsistent only because the lacking comma stands out visually; you shrug and carry on…



                … because you're familiar with some other manuals that explicitly warn you about surprising syntax, if any; and you think it's great their authors did such a good thing.



                But even if there was a difference with or without a comma, how much can it matter? since




                • you run stat -c '%n' / and get / which is expected;

                • you run stat --format='%n' / and get the same result;


                but




                • you run stat -c --format='%n' / and get --format=/.



                I'm afraid I might be missing some simple detail.




                Compare this to the case of ellipsis in menus of GUI tools. Did you know many applications use ellipsis () to denote menu items that don't take immediate action? E.g. Print… spawns additional window where you can change something before you proceed with the actual printing, or you can cancel; in such application Print (without ellipsis) would print right away.



                I had been using GUI tools efficiently for several years, before I learnt what ellipsis mean. It was by chance, I read some trivia and only then I noticed ellipsis are (and "always" were) there. Now I know any menu item with ellipsis is "safe", it should provide me a way to cancel.



                My point is: such a detail may mean something, it may be quite useful (so you asked a reasonable question); but if you can make stat do what you want (and if I can use menus to get what I want) then missing the detail is not a big deal.






                share|improve this answer




























                  3












                  3








                  3








                  what is the difference with or without a comma?




                  None. Use either short or long option, the comma doesn't matter.



                  In my Kubuntu I copied files from /usr/share/man/man1 and /usr/share/man/man8, decompressed, sanitized (removed fluff) and searched with regex for options without the comma. I browsed the results, examined few "suspicious" files. My conclusions (heuristic, not strict):




                  • Relatively few manuals use the no-comma style.

                  • Those which do rarely mix it with the with-comma style.


                  • man stat uses no-comma for -c --format only, it's probably just a typo.



                  how do I learn this kind of stuff?




                  My way: by getting familiar with. Man pages are for people; most people (even nerds) are able to deal with fuzzy patterns, typos, little inconsistencies or exceptions. Some manuals are so huge (man 1 bash) or need to deal with abstract concepts (man 5 sudoers), so they are more formal; but when you need to solve a specific problem you rarely study the whole manual, you seek examples. So you experiment, adapt available examples, write commands that don't work, write commands that do work, compare whatever works against the documentation.



                  And then you start to know these somewhat fuzzy conventions. You rely on the Rule of Least Surprise, you expect to see some short options equivalent to some long options. You don't even notice some manuals omit commas. You see man stat is inconsistent only because the lacking comma stands out visually; you shrug and carry on…



                  … because you're familiar with some other manuals that explicitly warn you about surprising syntax, if any; and you think it's great their authors did such a good thing.



                  But even if there was a difference with or without a comma, how much can it matter? since




                  • you run stat -c '%n' / and get / which is expected;

                  • you run stat --format='%n' / and get the same result;


                  but




                  • you run stat -c --format='%n' / and get --format=/.



                  I'm afraid I might be missing some simple detail.




                  Compare this to the case of ellipsis in menus of GUI tools. Did you know many applications use ellipsis () to denote menu items that don't take immediate action? E.g. Print… spawns additional window where you can change something before you proceed with the actual printing, or you can cancel; in such application Print (without ellipsis) would print right away.



                  I had been using GUI tools efficiently for several years, before I learnt what ellipsis mean. It was by chance, I read some trivia and only then I noticed ellipsis are (and "always" were) there. Now I know any menu item with ellipsis is "safe", it should provide me a way to cancel.



                  My point is: such a detail may mean something, it may be quite useful (so you asked a reasonable question); but if you can make stat do what you want (and if I can use menus to get what I want) then missing the detail is not a big deal.






                  share|improve this answer
















                  what is the difference with or without a comma?




                  None. Use either short or long option, the comma doesn't matter.



                  In my Kubuntu I copied files from /usr/share/man/man1 and /usr/share/man/man8, decompressed, sanitized (removed fluff) and searched with regex for options without the comma. I browsed the results, examined few "suspicious" files. My conclusions (heuristic, not strict):




                  • Relatively few manuals use the no-comma style.

                  • Those which do rarely mix it with the with-comma style.


                  • man stat uses no-comma for -c --format only, it's probably just a typo.



                  how do I learn this kind of stuff?




                  My way: by getting familiar with. Man pages are for people; most people (even nerds) are able to deal with fuzzy patterns, typos, little inconsistencies or exceptions. Some manuals are so huge (man 1 bash) or need to deal with abstract concepts (man 5 sudoers), so they are more formal; but when you need to solve a specific problem you rarely study the whole manual, you seek examples. So you experiment, adapt available examples, write commands that don't work, write commands that do work, compare whatever works against the documentation.



                  And then you start to know these somewhat fuzzy conventions. You rely on the Rule of Least Surprise, you expect to see some short options equivalent to some long options. You don't even notice some manuals omit commas. You see man stat is inconsistent only because the lacking comma stands out visually; you shrug and carry on…



                  … because you're familiar with some other manuals that explicitly warn you about surprising syntax, if any; and you think it's great their authors did such a good thing.



                  But even if there was a difference with or without a comma, how much can it matter? since




                  • you run stat -c '%n' / and get / which is expected;

                  • you run stat --format='%n' / and get the same result;


                  but




                  • you run stat -c --format='%n' / and get --format=/.



                  I'm afraid I might be missing some simple detail.




                  Compare this to the case of ellipsis in menus of GUI tools. Did you know many applications use ellipsis () to denote menu items that don't take immediate action? E.g. Print… spawns additional window where you can change something before you proceed with the actual printing, or you can cancel; in such application Print (without ellipsis) would print right away.



                  I had been using GUI tools efficiently for several years, before I learnt what ellipsis mean. It was by chance, I read some trivia and only then I noticed ellipsis are (and "always" were) there. Now I know any menu item with ellipsis is "safe", it should provide me a way to cancel.



                  My point is: such a detail may mean something, it may be quite useful (so you asked a reasonable question); but if you can make stat do what you want (and if I can use menus to get what I want) then missing the detail is not a big deal.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 19 '18 at 12:40

























                  answered Sep 18 '18 at 1:04









                  Kamil MaciorowskiKamil Maciorowski

                  25.8k155678




                  25.8k155678






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • 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%2fsuperuser.com%2fquestions%2f1358999%2fin-linux-command-manuals-what-is-the-difference-between-having-in-the-descripti%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

                      Сан-Квентин

                      8-я гвардейская общевойсковая армия

                      Алькесар