On Fri 10 Dec 2021 at 00:41:29 (-0500), Cindy Sue Causey wrote: > On 12/9/21, john doe <johndoe65...@mail.com> wrote: > > On 12/9/2021 8:55 AM, Tim Woodall wrote: > >> Does that work or is it a typo? I've always used: > >> > >> apt-get autoremove --purge > >> > > $ apt-get --help > > apt 2.3.13 (amd64) > > Usage: apt-get [options] command > > apt-get [options] install|remove pkg1 [pkg2 ...] > > apt-get [options] source pkg1 [pkg2 ...] > > [snip] > > > > Specifying options before the command looks to be more man page > > compliant... > > > I've seen one rare occasion where [positioning] overall really > matters, but it wasn't apt-get. It was about mount'ing of ISO or img > files or maybe even a third file type. > > My apologies that I can't remember what flag I was using. More than > one flag was involved because of the more unusual mount I was > attempting. One flag was expressed in front of declaring the mount > point, and the other was typed in afterward. > > It would mount fine in one instance with one particular flag at the > end (because that's how it had been advised somewhere online). That > same format did NOT work for one now forgotten file type. It all had > to be stated before the file and mount point declaration. > > It makes sense. There should be some kind of universal uniformity to > best guarantee predictability of outcome across the widest range of > user setups possible. For mounting, that would be to say do all these > things stated here in this beginning lump to this file being mounted > at this point as declared here at the end of this entire [statement]. > It reminds me of "subject and predicate" sentence structuring in > grammar.
It's not rare for placement of options and subcommands to matter. You can't have the sort of uniformity you want, because many commands read their options and subcommands in L-R order, and effectively act upon them as they read them. APT is very forgiving with the above, because they obviously mean the same thing. And stick a --simulate at the end of the line and you get a harmless dry-run. But don't try that with dpkg: it will happily destroy your system and then say "Oh, didn't you really mean that? Sorry" when it encounters --simulate at the end of the commandline. Similarly, get a --delete in the wrong place after a find command, and you can lose half your filesystem. Cheers, David.