|
|
Subscribe / Log in / New account

The Grumpy Editor's Python 3 experience

The Grumpy Editor's Python 3 experience

Posted Aug 1, 2018 0:19 UTC (Wed) by madscientist (subscriber, #16861)
In reply to: The Grumpy Editor's Python 3 experience by k8to
Parent article: The Grumpy Editor's Python 3 experience

It's always really bothered me that the designers of the command line syntax chose "o" and "u". These are terrible, confusing letters. "u" (user) gives no information at all (I'm a user, you're a user, everyone attempting to type this command is a user) and "o" is completely ambiguous because it could stand for "other" but also "owner".

So, it could be "u" means the owner of the file and "o" means other users, or it could be that "o" means the owner of the file and "u" means other users.

Really, it's hard to imagine a worse pair of letters for sowing confusion. In fact the way it makes the most sense to me is exactly the opposite of reality: "o" should be "owner" and "u" should be general users.

That's why I prefer the numerical codes and consider them simpler to get right. Every time I need the text syntax (if I need to do something more sophisticated such as remove the w bit without touching other values) I have to go look up the man page to make sure I have it right. You definitely don't want to mess it up!!


to post comments

The Grumpy Editor's Python 3 experience

Posted Aug 1, 2018 3:08 UTC (Wed) by k8to (guest, #15413) [Link]

The problem of 'o' and 'u' is not the command line, but really how the flags were named originally. Unless you're objecting to the short form, in which case sure it doesn't help, but command line flags aren't designed for clarity very often.

The Grumpy Editor's Python 3 experience

Posted Aug 1, 2018 11:57 UTC (Wed) by tao (subscriber, #17563) [Link] (2 responses)

I have a hard time seeing how "u=user", "g=group", "o=other", "r=read", "w=write", "x=execute" would be harder to memorise than "second position user", "third position group", "fourth position other", "1=execute", "2=write", "4=read", except if you have a 4th, leading, digit, in which case they are setuid, setgrp, sticky bit...

But I guess we all have different ways of remembering things.

The Grumpy Editor's Python 3 experience

Posted Aug 1, 2018 13:03 UTC (Wed) by madscientist (subscriber, #16861) [Link] (1 responses)

Position is trivial to remember since it's the same way file permissions are shown by ls etc. Most of the detail you suggest isn't used 99% of the time: people really only care about a few possibilities: 4 for read-only and 6 for read-write, then add one if you also want execute.

I already clearly (I think) explained the specific issue I had. I don't object to the text form, and as mentioned I do use it when I need to use the "+" or "-" forms of chmod for example. However I think poor design choices make it harder to use correctly and so I prefer the numeric system on the command line when possible. There's little possibility of mixing up the order of three numbers.

Please note I'm speaking here specifically of the "chmod" command line syntax.

The Grumpy Editor's Python 3 experience

Posted Aug 2, 2018 12:10 UTC (Thu) by tao (subscriber, #17563) [Link]

ls shows rwx though, not the octal equivalent.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds