3

This question already has an answer here:

When I check the coreutils, I found that GNU Coreutils

10 Directory listing
This chapter describes the ls command and its variants dir and vdir, which list information about files.

• ls invocation:        List directory contents.
• dir invocation:       Briefly ls.
• vdir invocation:      Verbosely ls.
• dircolors invocation:     Color setup for ls, etc.

dir and vdir is just appended to coreutils as an alternative of ls,

What's the purpose of such a setting.

I really initially believe that the coreutils are defined as less as possible.

marked as duplicate by JdeBP, Jeff Schaller, schily, mosvy, JigglyNaga Nov 8 '18 at 10:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Not sure I understand the question. The second answer in this thread seems to explain the difference. – number9 Nov 7 '18 at 2:43
  • 1
    "GNU's Not Unix". GNU utilities are not minimalistic. They are primarily convenient. This means that they generally break with the Unix tradition of "doing one thing only, and doing it well". Other examples of this is the -printf predicate to GNU find and and various other extra features crammed into various other utilities (features that are already handled by another set of utilities). – Kusalananda Nov 7 '18 at 8:05
  • And we already have unix.stackexchange.com/questions/50377 (and its duplicates) asking what the difference between them is. – JdeBP Nov 7 '18 at 13:07
1

GNU is not completely minimal and dir is a common Microsoft command so it's aliased for convenience. Wiki is missing a full history but one might construct history from open-source archives.. https://en.m.wikipedia.org/wiki/Dir_(command)

  • The Unix minimal philosophy is about each command being minimal, not about minimal number of commands. However I see not whey there are 3 commands that do the same (or near same) thing. – ctrl-alt-delor Nov 7 '18 at 9:07
  • "Aliased" is a really bad choice of words for what dir is in terms of the GNU coreutils. A default shell alias proper would have done as nicely as providing a separate command. – 0xC0000022L Nov 7 '18 at 9:13
  • One would be better off constructing a history by reading books, wherein one will find that these two commands come from TOPS-20, not Microsoft, and that actual shell aliases used to be recommended for people used to the TOPS-20 commands. – JdeBP Nov 7 '18 at 9:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.