서버 / IT 서버8 M3의 유용한 유닉스 명령어 소개
2011.05.03 14:18
윈도우8 서버 M3가 유출되어 설치해 본 결과,
C:\BIN 에 유용한 유닉스 명령어들이 윈도우용으로 포팅되어 있길래 소개할까 합니다.
굳이 윈도우8이 아니더라도 사용할 수 있으니 다운받아 %PATH%에 넣고 사용하시면 됩니다.
1. cat.exe : type 명령어처럼 파일 내용을(ascii) 화면에 출력시킵니다.
M:\>cat list.txt
Volume in drive C has no label.
Volume Serial Number is 7860-7DAB
Directory of C:\
2009-07-14 오후 12:20 <DIR> PerfLogs
2011-04-29 오전 10:19 <DIR> Program Files
2011-04-29 오전 10:18 <DIR> Program Files (x86)
2011-02-24 오후 05:11 <DIR> Users
2011-04-28 오전 09:38 <DIR> Util
2011-03-16 오전 11:56 <DIR> Windows
0 File(s) 0 bytes
6 Dir(s) 22,931,742,720 bytes free
2. diff.exe : 두 텍스트 파일의 내용을 비교해 줍니다.
M:\>diff list1.txt list2.txt
2c2
< Volume Serial Number is 7860-7DAB
---
> Volume Serial Number is 7860-7DAC
3. du.exe : 디렉토리 파일의 디스크 사용량을 표시해 줍니다.
M:\>du \TEMP\*
Used Allocated Files
0 0 0 M:\TEMP\Low
0 0 0 M:\TEMP\msohtmlclip
0 0 0 M:\TEMP\msohtmlclip1
29,316 30,720 4 M:\TEMP\msohtmlclip1\01
0 0 0 M:\TEMP\plugtmp
29,316 30,720 4 Total
46,017,536/799,013,888 5.7% of disk in use
4. kill.exe : 프로세스를 죽입니다.
M:\>kill -f 3824
process cmd.exe (3824) - 'Administrator: C:\Windows\system32\cmd.exe' killed
5. head.exe / tail.exe : 출력 내용 중 위쪽/아래쪽에서 원하는 라인 수만큼 잘라 줍니다.
M:\>cat list1.txt | head -8 | tail -4
2009-07-14 오후 12:20 <DIR> PerfLogs
2011-04-29 오전 10:19 <DIR> Program Files
2011-04-29 오전 10:18 <DIR> Program Files (x86)
6. wc.exe : 라인/단어/문자 개수를 세어줍니다.
M:\>wc list1.txt
13 51 506 list1.txt
M:\>cat list1.txt | wc -l
13
M:\>cat list1.txt | wc -w
51
7. 기타 : 다들 아시겠지만, 유닉스의 grep 명령어는 부족하나마 find를 사용하시면 됩니다.
C:\>systeminfo | find "Memory"
Total Physical Memory: 6,142 MB
Available Physical Memory: 3,959 MB
Virtual Memory: Max Size: 6,141 MB
Virtual Memory: Available: 3,596 MB
Virtual Memory: In Use: 2,545 MB
댓글 [3]
-
Lime 2011.05.03 16:45 -
우금티 2011.05.04 17:46
고맙습니다. tar랑 sed, grep, which 네 개 다운받았습니다. 참 좋네요... 흐...
C:\> systeminfo | grep -i memory
Total Physical Memory: 6,142 MB
Available Physical Memory: 3,905 MB
Virtual Memory: Max Size: 6,141 MB
Virtual Memory: Available: 3,478 MB
Virtual Memory: In Use: 2,663 MBC:\> systeminfo | grep -i memory | sed s/Memory/RAM/g
Total Physical RAM: 6,142 MB
Available Physical RAM: 3,896 MB
Virtual RAM: Max Size: 6,141 MB
Virtual RAM: Available: 3,471 MB
Virtual RAM: In Use: 2,670 MBC:\> which systeminfo
C:\Windows\system32\systeminfo.EXE
-
publicstaticvoidMain() 2011.05.04 21:03 우와 정말 대단하군요
번호 | 제목 | 글쓴이 | 조회 | 추천 | 등록일 |
---|---|---|---|---|---|
[공지] | 강좌 작성간 참고해주세요 | gooddew | - | - | - |
42 | 서버 / IT| 근거리 통신망(LAN) 구축 지침서 [2] | gooddew | 5530 | 0 | 08-03 |
41 | 서버 / IT| Kernel_Compile_Guide-KLDP [2] | gooddew | 4968 | 0 | 08-03 |
40 | 서버 / IT| FrameRelayVPN 교육자료 [3] | gooddew | 5065 | 0 | 08-03 |
39 | 서버 / IT| FrameRelay 교육 [3] | gooddew | 4964 | 0 | 08-03 |
38 | 서버 / IT| frame-realy 이해 [2] | gooddew | 4994 | 0 | 08-03 |
37 | 서버 / IT| EMWAC IMS 설정하기 [1] | gooddew | 5021 | 0 | 08-03 |
36 | 서버 / IT| Email 교육 [1] | gooddew | 5019 | 0 | 08-03 |
35 | 서버 / IT| linux_net_config [2] | gooddew | 5237 | 0 | 08-03 |
34 | 서버 / IT| 라우팅종합개요 [1] | gooddew | 5239 | 0 | 08-03 |
33 | 서버 / IT| 월드와이드웹(WWW) 기초 [1] | gooddew | 5244 | 0 | 08-03 |
32 | 서버 / IT| web 서버 운영 [1] | gooddew | 5615 | 0 | 08-03 |
31 | 서버 / IT| 가상 개인 네트워킹 [2] | gooddew | 5146 | 0 | 08-03 |
30 | 서버 / IT| UPS 기술문서 [1] | gooddew | 5352 | 0 | 08-03 |
29 | 서버 / IT| telnet_ftp 서버구성하기 [2] | gooddew | 5358 | 0 | 08-03 |
28 | 서버 / IT| 시스코라우터 패스워드 확인및 복구법 [1] | gooddew | 6956 | 0 | 08-03 |
27 | 서버 / IT| router essential [1] | gooddew | 5095 | 0 | 08-03 |
26 | 서버 / IT| NFS(네트워크 파일 시스템) [2] | gooddew | 5219 | 0 | 08-03 |
25 | 서버 / IT| IPV 6 기술동향 | gooddew | 5225 | 0 | 08-03 |
24 | 서버 / IT| iptables를 이용한 내부 인터넷 공유하기 | gooddew | 6708 | 0 | 08-03 |
23 | 서버 / IT| DAT 기술문서 | gooddew | 5108 | 0 | 08-03 |
https://gnuwin32.sourceforge.net/
가면 윈도우용 유닉스 명령어 다운 받을 수 있습니다.