๐Ÿš€

Quick Overview

The two commands are identical, and you can consider that โ€œdirโ€ is equivalent to the โ€œls -Cbโ€ command.

In the Linux world, two common commands, โ€œlsโ€ and โ€œdirโ€œ, replicate each other so well that most Linux users think one of them is an alias or symbolic link to the other (itโ€™s not true).

Another mistake most people make is judging the output of ls (which by default displays the color) and dir (which does not without specifying an option) and again failing to judge it because โ€œlsโ€ is an alias to โ€œls --color=autoโ€œ.

To verify this, execute the โ€œalias lsโ€ command, or check the result after executiโ€ฆ

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help