The Lack Of Consistency With The Linux Terminal

preview_player
Показать описание
Why is it so hard to learn the Linux command line and the various command line utilities? I think one of the reasons for this is the lack of consistency when it comes to command line programs.

WANT TO SUPPORT THE CHANNEL?

DONATE CRYPTO:
💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ

DT ON THE WEB:

FREE AND OPEN SOURCE SOFTWARE THAT I USE:

Your support is very much appreciated. Thanks, guys!
Рекомендации по теме
Комментарии
Автор

i guess that's why GNU created the double dash long option style, to allow --help to always display help information, --version to always show version number, and so on, regardless of what the single-letter options correspond to. GNU software in general seems to have a focus on accessibility, including localizing their software into many different languages

shallex
Автор

For some commands, the '-v' flag means 'verbose'. I use the man pages all the time and i also make my own cheat sheets. Nowadays they look more like an unorganized manual. If you're going to install an Arch system from scratch don't forget to install 'man-db' and 'man-pages' packages so that you can have the manual pages. Those packages are named 'man-db' and 'manpages' in Debian (no dash/hyphen on the second package).

ruirosado
Автор

The one thing I really don't like is long options without double hyphens. If it's one letter, one hyphen, if it's more, two hyphens. I use Imagemagick a lot but their flags are all/mostly single hyphen. I would also probably prefer 'program --help' over 'man program', but I usually default to 'man program'.

encyclpedia-
Автор

Thank you for this video. More and more I am pointing new Linux users to your channel, not only to learn about using Linux as software but also to learn the Linux philosophy from you.
I appreciate that you admit you find this frustrating and confusing sometimes. Just your admitting this, I believe, helps to give confidence to new users who often feel overwhelmed. It's good to know that we are not alone.

Not-THAT-ChrisPratt
Автор

Still more consistent than the Windows side

plastic_helmet
Автор

IMO, the issue is that single letter parameters are not semantic. It makes more sense for the standardized parameters to be --fullword, than single letter equivalents. Single letters should be reserved for application specific parameters, which you want to be able to type fast when you are using the tool

voidmind
Автор

Short options can strive for consistency but in many cases can't achieve it. -v is also the verbose option in many cases. Long options are more useful in scripts when you want to recall what you meant or someone else has to use your script and is unaware of what the short options would be without looking them up.

doomikusz
Автор

I tend to only ever use the long options when I want the help listing or version info from apps because -h is not always for help and -v is in quite a few apps a verbose flag. For instance, with tar the -v flag denotes verbosity and with some apps it will increase the verbosity level, so you can do -vvv. For the apps I write myself, I tend to use -i for input and -o for output, but that doesn't always make sense, like with grep and sed which can take multiple files and since the shell handles wildcard expansions it makes more sense to not require -i as input because they'd either require you to quote and handle expansions themself or they'd require you to use the option a lot of times.

anon_y_mousse
Автор

1:50 I think what happened is Chromium's -h flag executes 'man $0' which would be awesome if all the derivatives remembered to package a man page

Hyperboid
Автор

02:23 "Try 'cat --help' for more information." is cat's output, not shell's

RandomGeometryDashStuff
Автор

What i found frustrating is the long form can be a word followed by a space, a word preceded by a double dash followed by a space, or a word followed by an equals sign. The list option can be a small l or a capital L and remembering big or small letter is hard.

chevyslyme
Автор

Inconsistency is better than monopoly because monopoly is dangerous for free software

tctba
Автор

Luckily it is fairly easy to run through a few options.

I get bothered when short flags cannot be chained together.
together.
-az vs -a -z

dereklomax
Автор

I hate it when some programs don't support long-style options, so --help just gives an error that '-' is not an option, like ssh. Other programs, like find use a single - for long-style options, like -iname. Sometimes, you can chain single-letter options, and sometimes you can't, so you have to do -a -b. Some programs require you to specify --option=value, some --option value, and it gets more confusing with single-letter options, because most often it's -o value (even with long-style requiring an =). Sometimes, you can repeat a single-letter option for more, like with -v when used as a verbose option, for example -vvv. I could probably give more examples, but you get the point, the shell parameters are weird, complicated and hard. And it gets even worse when programs don't require a - when using single-letter parameters, like ps. When I explain them to new-to-linux users, thet just stick to remembering the single-letter option combinations without ubderstanding what does what, like ls -al (sometimes they think it's ls -all), du -hs, df -h, netstat -tulpn, ps aux, all the pacman commands, etc.

ggorg
Автор

How commands get input is even less consistent. Tar is a good example. I often have to Google how to use tar.

oraz.
Автор

I disagree with you, a lot of software used on GNU/Linux systems is not explicitly made for GNU/Linux nor the GNU ecosystem, therefore those CLI adopt other conventions. Where GNU wants to use double dashes for long options, single dashes for single letter options, having help flags etc... other prefers UNIX-style `man` pages (no need for --help, just "man"!). "v" is also commonly used for verbose level.

ncfr
Автор

i noticed the same thing when i was extracting both zip and tar files. with the unzip utility, to unpack in a specific directory, you have to use the -d flag, but with tar, you have to use the -C flag to do the same thing.

juipeltje
Автор

These commands used to be even more inconsistent before GNU standardized them. Interestingly, Multics tried very hard to make their shell commands consistent (unlike Unix)

Gooberpatrol
Автор

Very nice summary. I totally understand the reasons behind the inconsistentcies, it has to do with simplifying the c code behind the utilities I think, but it's frustrating sometimes

theodorealenas
Автор

Is it reasonable to expect the developers to reserve traditional flags for specific functions? Taking the example of -v for version information, what if the tool needs to have a verbose flag? Many tools would implement verbose on -v which would conflict with version.

SlideRSB
visit shbcf.ru