doskey 명령어를 사용하여 cmd 창에서 alias를 지정해보자.
아래와 같이 레지스트리에 cmd 창이 열릴 때 실행할 배치 파일을 설정하자.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] "Autorun"="C:\\autoexec.cmd"
아래와 같이 배치 파일을 작성하자.
@ECHO OFF @DOSKEY sqls=sqlplus scott/tiger@hrjdb01 @DOSKEY ls=dir @DOSKEY h=doskey /history C: CD /
cmd 창을 새로 열면 doskey 매크로를 alias처럼 사용할 수 있다.
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\>ls C 드라이브의 볼륨에는 이름이 없습니다. 볼륨 일련 번호: A0EA-E24C C:\ 디렉터리 2012-02-07 오후 06:14 [DIR] app 2012-06-23 오전 10:20 104 autoexec.cmd 2012-06-01 오후 04:46 [DIR] Program Files 2012-06-13 오후 12:58 [DIR] Program Files (x86) 2012-05-29 오후 12:41 [DIR] Users 2012-06-13 오후 12:58 [DIR] Windows 1개 파일 104 바이트 5개 디렉터리 64,464,166,912 바이트 남음 C:\>sqls SQL*Plus: Release 11.2.0.1.0 Production on 토 6월 23 10:21:12 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. 다음에 접속됨: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> exit Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options에서 분리되었습니다. C:\>h ls sqls h
'OS > Windows' 카테고리의 다른 글
findstr 명령어 (0) | 2019.10.12 |
---|---|
원격 데스크톱 다시 시작 (0) | 2018.06.14 |
하위 디렉토리를 포함한 조회 및 삭제 (0) | 2014.10.10 |
route 명령어로 내부망과 인터넷을 분리하여 사용 (0) | 2012.07.09 |