如何在Windows命令提示符下命名别名?


3

我正在使用Unix和Windows机器,我想使命令提示符的行为类似于我的Unix Teminals。

其中一件事是我在Unix上习惯的别名。

例如 - 我习惯了

alias p 'ls -lt'; pwd;

如何使用dir命令在Windows命令提示符下设置此别名?

Answers:


7

你想看一下doskey,这是cmdWindows XP以后内置的命令(在以前的版本中是一个DOS实用程序)。

简单用法示例: doskey dirw=dir /w

现在使用dirwwill代替调用dir /w

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.