#20 Emulating Another Environment: DIR

While many computer aficionados learned how to work with an operating system within a Unix or Linux environment, many others started on other systems with other commands and other styles of interaction. It's quite likely that some users in your organization, for example, are still more comfortable on the MS-DOS command line than they are when faced with a Unix shell prompt. A set of aliases can be installed to ease the transition a little bit, like mapping the DOS command DIR to the Unix command ls:

alias DIR=ls

However, this mapping won't help users if they've already taught themselves that the /W option produces a wide listing format, because the ls Unix command will just complain that directory /W ...

Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.