On 11-Oct-04 Vasko Tomanov wrote:
In Windows, you can set an environment variable (I think it's called DIRCMD) that provides default options for the dir command. I would like to know how to do this on Linux?
Older versions of Linux did not have a "built-in" 'dir' command, though you could set one up using the 'alias' mechanism.
E.g.
alias dir='ls -l'
Nowadays there is the binary program 'dir' which "is equivalent to `ls -C -b'; that is, by default files are listed in columns, sorted vertically, and special characters are represented by backslash escape sequences."
You can study "man dir", choose the options you want (say "optlist" represents your chosen list of options) and then you can put the line
alias dir='dir optlist'
in either your user .bashrc file (for user-specific settings) or in /etc/bashrc (for all-user settings).
Hoping this helps, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 [NB: New number!] Date: 11-Oct-04 Time: 11:52:36 ------------------------------ XFMail ------------------------------