Announcement

Collapse
No announcement yet.

Space used by programmes

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Thank you.

    Very well explained.
    kubuntu version: 16.04.5 LTS

    Laptop: Toshiba-Satellite-L350

    Comment


      #32
      Actually, the command is apt-get. "--purge" and "autoremove" are options. A command is always in the first position. Options always follow. A terminal command is a file stored on the hard drive which is either an ELF executable or a proper bash script, both with execute permissions set (for the user). Options, also called "parameters", are what the commands are designed to parse in order to learn what the user has in mind. Parameters used to begin with a "-" or a "--", but more recently are just words that are parsed by the command. I can never remember all the parameters a command might parse, or whether they begin with a dash or double dash or just stand alone. So, man and its many manifestations are a blessing to me.

      The use of graphical front ends to terminal commands were supposed to make using a terminal command much easier. In some circumstances a GUI does do that, but a lot of the times the GUI does not present all of the parameters available to a command, so the GUI for some commands are merely for the most often used parameters.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #33
        Originally posted by GreyGeek View Post
        Actually, the command is apt-get. "--purge" and "autoremove" are options. A command is always in the first position. Options always follow. A terminal command is a file stored on the hard drive which is either an ELF executable or a proper bash script, both with execute permissions set (for the user). Options, also called "parameters", are what the commands are designed to parse in order to learn what the user has in mind. Parameters used to begin with a "-" or a "--", but more recently are just words that are parsed by the command. I can never remember all the parameters a command might parse, or whether they begin with a dash or double dash or just stand alone. So, man and its many manifestations are a blessing to me.
        That sort of depends on your definition of "a command". The apt-get man page describes these as commands (for apt-get):
        unless the -h, or --help option is given, one of the commands below must be present.
        (and options are described in their own section)
        Of course these are not stand-alone executables, just command arguments for apt-get.
        Last edited by kubicle; Oct 20, 2014, 03:43 PM.

        Comment


          #34
          Ya. I guess I am old school, obviously. And as a programmer "parameters" was/is the word used to describe what is passed to main or its functions. Sometimes documenters use the wrong word. As far as the man page of apt-get is concerned, the word "command" is misused, IMO.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #35
            Think of it as recursion, Jerry. The general syntax would be:

            command --option subcommand --suboption

            "command" is what you run, and "--option" affects that. "--subcommand" instructs "command" to carry out one of many functions, and "--suboption" affects how the subcommand (the function) works. Here's a real-world example:

            apt-get --simulate install --no-install-recommends foobar

            Actually, apt-get is rather forgiving when it comes to ordering. But avconv, for example, isn't at all. Take a look at the man page for that one!

            Comment


              #36
              OK, Steve, I'll buy "subcommand" as another name for "option" or "parameter". Why avconv is so specific as to ordering of options is obvious once the diagrams in the man pages are referenced.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #37
                Originally posted by GreyGeek View Post
                Sometimes documenters use the wrong word. As far as the man page of apt-get is concerned, the word "command" is misused, IMO.
                Perhaps (again, depending on your definition), but the term "command" is fairly widely used in documentation in reference to a specific type of command arguments (not just in apt-get), for example:
                git [<git-options>] <command> [<args>]
                nmcli [ OPTIONS ] OBJECT { COMMAND | help }
                perf [--version] [--help] COMMAND [ARGS]
                Last edited by kubicle; Oct 21, 2014, 02:21 AM.

                Comment


                  #38
                  Ya. Like I said, I'm an old dog from the old school.
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment

                  Working...
                  X