[Nottingham] *nix most dangerous command line commands...

Martin martin at ml1.co.uk
Sat Jun 14 12:26:45 UTC 2014


On 14/06/14 13:06, Martin wrote:
> man rm:
> 
>        -i     prompt before every removal
> 
>        -I     prompt once before removing more than three files, or when
> removing recursively.  Less intrusive than -i, while still giving
> protection against most mistakes

Further thought and rambling:


That is a good idea for allowing the operator the freedom to be
dangerous but guarding against mistaken greater damage.


And for another aside:

At least across the GNU utilities in the GNU part of GNU/Linux, there is
reasonable consistency for command flags that has set the convention of:

lowercase single letter: Enable an extra feature;
Uppercase single letter: Disable a feature;

--phrase:	for wordy descriptive flags;
--phrase=:	for wordy descriptive flags with a parameter.


That last example gets badly confused for what happens if your parameter
itself has an "=" or " " characters...

(And that is a killer problem for some of the things you might want to
put on the kernel command line...)


And then there are some good utilities that very annoyingly uniquely
just do their own thing for what comes after the command...

One thing I have noticed is that there is a more recent trend away from
using an unordered list of parameters to instead use a list of
instructions more like natural language... For example:

ip [ OPTIONS ] OBJECT COMMAND ...

btrfs FEATURE COMMAND [action]

eselect [global options] module [action]


And then there is the "sox" command!


All a sign of more natural language thinking? Or a sign of increased
complexity?

Cheers,
Martin

-- 
- ------------------ - ----------------------------------------
-    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7
- martin @ ml1 co uk - Import from   hkp://subkeys.pgp.net   or
- ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg



More information about the Nottingham mailing list