월요일, 9월 02, 2019

windows doskey 명령어로 매크로 기능 이용하기

Welcome file


Windows cmd doskey 명령어로 매크로 기능 이용하기


Test Environment

  • Test OS : Windows 10

windows에서 CMD로 명령어를 수행하다 보면 Liunx에서 사용하던 명령어때문에 항상 헷갈려하는 명령어가

바로 dir = ls 명령어이다.

바로 이부분때문에 찾아본 명령어가 바로 doskey 명령어로 alias처럼 쓰는 방법에 대해 정리 하였다.

우선 사용할 명령어 정의

alias.cmd

@echo off

:: commands
doskey alias   = doskey $*
doskey cat     = type $*
doskey clear   = cls
doskey grep    = find $*
doskey history = doskey /history
doskey man     = help $*
::
doskey kill    = taskkill /PID $*
doskey ls      = dir $*
doskey ll      = dir $*
::
doskey cp      = copy $*
doskey cpr     = xcopy $*
doskey mv      = move $*
doskey rm      = del $*
doskey rmr     = deltree $*
::
doskey ps      = tasklist $*
doskey pwd     = cd
::
doskey sudo    = runas /user:administrator $*

레지스트에 등록하기

regedit

경로 : 컴퓨터\HKEY_CURRENT_USER\Software\Microsoft\Command Processor

이름 : Autorun

데이터 : E:\software\google\2_Shellscript\alias.cmd



적용 화면




Related Posts:

  • CMD - free 명령어를 이용한 메모리 사용률 확인 방법메모리 사용률 확인사용 환경에서 필요한 내용만 정리.시스템 환경OS : CentOS 7 3.10.0-957.el7.x86_64실행 명령어centos 6.x 버전 밑 버전에서 메모리 읽는 방식이 7에서 부터는 변경이 되었다. (-/+ buffers/cache 부분이 사라… Read More
  • CMD - which, readlink 명령어를 활용법리눅스에 설치 된 JAVA 경로 확인 방법사용 환경에서 필요한 내용만 정리.시스템 환경OS : CentOS 7 3.10.0-957.el7.x86_64 실행 명령어사용 명령어 which, readlinkwhich : 명령어의 경로를 확인하는 명령어 readlink : 심… Read More
  • Linux a frequently used command 리눅스명령어 Linux a frequently used commandTest OS : RedHat 7.2, CentOs 7 수정된 config 파일 #n일 이상 된 xml 파일 찾기 find . -type f -name "*.xml" -mtime -7… Read More
  • CDM - chwon 명령어 사용법파일 소유자 및 그룹 변경실 사용 환경에서 필요한 내용만 정리.Test environmentOS : CentOS 7 3.10.0-957.el7.x86_64주요 내용A file's owner can be changed using the chown command.chown… Read More
  • Windows tasklist 활용 하기Windows tasklist 활용 하기 프로세스 확인C:\Users>tasklist /fi "imagename eq java.exe" netstat 명령으로 LISTENING 중인 서비스 port 확인C:\Users>netstat -an… Read More

0 Comments:

댓글 쓰기