🪟 CMD Basic Lessons
Windows Command Prompt အတွက် folder/file command တွေ၊ network troubleshooting command တွေ၊ batch automation အခြေခံတွေကို စုထားတာပါ။
CMD Intro
CMD က Windows ရဲ့ classic command-line shell ပါ။ GUI မဖွင့်ဘဲ file management, network check, system info, automation စတာတွေ လုပ်နိုင်ပါတယ်။
ver
echo Hello CMD
cls
File Commands
type notes.txt
copy notes.txt backup.txt
move backup.txt old-notes.txt
ren old-notes.txt archive.txt
del archive.txt
xcopy src backup /E /I
Folder Commands
mkdir projects
mkdir app\controllers
rmdir empty-folder
rmdir /s old-project
dir /ad
Network Commands
ipconfig
ipconfig /all
ipconfig /flushdns
ping google.com
tracert google.com
nslookup example.com
netstat -ano
arp -a
route print
Search Commands
File ထဲ text ရှာတာ၊ executable path ရှာတာ၊ output ကို filter လုပ်တာတွေမှာသုံးပါတယ်။
findstr "error" app.log
findstr /S /I "TODO" *.txt
where node
where git
System Commands
systeminfo
tasklist
taskkill /PID 1234 /F
where node
driverquery
hostname
whoami
Environment Variables
Environment variable တွေက programs တွေသုံးတဲ့ config values ပါ။ PATH ထဲမှာ executable folder တွေရှိတယ်။
set
echo %PATH%
set APP_ENV=local
echo %APP_ENV%
Batch Files
.bat file ထဲ command တွေစုရေးပြီး automation လုပ်နိုင်ပါတယ်။
@echo off
echo Starting project
cd C:\Users\DEll\Desktop\vue_basic_test
start index.html
pause
Redirect & Pipe
Command output ကို file ထဲသိမ်းတာ၊ command တစ်ခု output ကို နောက် command တစ်ခုထဲပို့တာတွေ လုပ်နိုင်ပါတယ်။
dir > files.txt
ipconfig /all >> network-info.txt
tasklist | findstr chrome
type app.log | findstr error
Safety Tips
del,rmdir /sမသုံးခင် path သေချာစစ်ပါ။- Admin CMD ကိုလိုအပ်မှပဲဖွင့်ပါ။
- Unknown batch file မ run ပါနဲ့။