|
Answer» When I try to create and ALIAS I get the error"is not recognized as an internal or external command, operable program or batch file. " What is the PROPER way to create as alias in CMD?What do you mean by 'alias' ?
GrahamIn Unix / Linux you can do e.g.
alias ll=ls -l
and afterwards when you type ll at the bash prompt it is as if you had typed ls -l
here is a list of some aliases I have on my SuSe box
Code: [Select]alias attrib='chmod' alias chdir='cd' alias copy='cp' alias cp='cp -i' alias d='dir' alias del='rm' alias deltree='rm -r' alias dir='/bin/ls $LS_OPTIONS --format=vertical' alias edit='pico' alias ff='whereis' alias ls='/bin/ls $LS_OPTIONS' alias mem='top' alias move='mv' alias mv='mv -i' alias pico='pico -w -z' alias rm='rm -i' alias search='grep' alias v='vdir' alias vdir='/bin/ls $LS_OPTIONS --format=long' alias which='type -path' alias *CENSORED*='watch -n 1 w -hs' alias wth='ps -UXA | more'
The reason, airhud868, why you got the error message is that CMD does not have aliases
You could use SET I suppose, e.g.
set mydir=dir /w /a-d /on
and then type
%mydir% at the prompt or have it in a batch file (provided you had set it as an environment variable first)
But you would be better off creating a batch file and putting it on your PATH
Moral: CMD is not Linux (or Unix)
|