Announcement

Collapse
No announcement yet.

Space used by programmes

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

    #31
    Originally posted by anonprivate View Post
    OK

    Out of interest

    sudo apt-get --purge autoremove

    I have read the man page.

    Purge is an option and autoremove a command.

    I get a little confused between options and commands and the use of, or not, --

    Purge sounds like a command
    In short, apt-get requires one command that basically tells apt-get what to do, these are listed in the DESCRIPTION section of the man page.
    Then you can tweak the behavior of the command by defining additional options, these are listed in the OPTIONS section of the man page and are prefixed with either -- or - (depending on whether you use long or short options).

    Of course it might be confusing that purge can be used either as a command or an option, "sudo apt-get purge <packagename>" (purge used as a command) is the same as "sudo apt-get --purge remove <packagename>" (remove as the command, --purge as an option).

    The command autoremove does not purge packages by default, hence the need for the --purge option when using it if you want to completely remove the packages.

    Comment


      #32
      Thank you.

      Very well explained.
      kubuntu version: 16.04.5 LTS

      Laptop: Toshiba-Satellite-L350

      Comment


        #33
        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


          #34
          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


            #35
            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


              #36
              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


                #37
                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


                  #38
                  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


                    #39
                    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