Windows command line tutorial[part1]
Are you guys penetration tester , system administrator? How much is your windows command line knowledge? Hey don't start laughing ;). As a expert system administrator you must have some command line knowledge and if you are a Penetration tester then this is your first way …. No?
Anyway, I will try to write most of windows commands which may help you too. But Remember that I will not explain in details Because this may take very long time so you should try practically(VMware installed?). Hope you have some good logic too(If not then how we think like a Genius ?? hehe) .
Think these are practical example then tutorial which you need to yourself practically.
Think these are practical example then tutorial which you need to yourself practically.
Hope you know how to open the cmd.exe(Start>>Run>>cmd . And Hit ENTER).
If you type 'help' then you will get all possible command to execute . But do you exactly know how to work with these command effectively?
If you want to open another cmd then just “cmd” or “start” command.
Make a directory:
mkdir c:\admin
change to the directory:
cd c:\admin
deleting a file:
del c:\web\index.asp
reading from command line :
type c:\admin\some.txt
writing a file:
echo “” > test.html
echo “”>>test.html
echo “
this is test as a system admin
” >>test.htmlecho “” >>test.html
now try to see the file “type test.html”
removing a directory:
rmdir c:\admin or rmdir /S c:\adminto removing the directory.
Many garbage in your console so clear :
cls
How many directory ?:
See how many directory in the current directory.
dir
see how many directory into C:\windows\system32.
see how many directory into C:\windows\system32.
dir "c:\windows\system32”
Hidden Directory:
dir /aHD c:\windows\system32
Copy a file:
copy c:\win.inic:\admin\here\win.txt
for directroy or file.
xcopy e:\some\directory f:\somewhere\copy
for directroy or file.
xcopy e:\some\directory f:\somewhere\copy
removing directory:
moving a file permanently and renaming:
mov c:\filetomovec:\somewhere\newname
error redirecting:
app.exe 2>error.txt
Open the error.txt “type error.txt” or notepad “error.txt”
Multiple command:
move filetomove c:\path|| telnet microsoft.com 80
anycommand || dir || more-command
type somefile.txt & cmd.exe or type somefile.txt && cmd.exe
paginate long output:
dir c:\windows\system32 | more (You have to hit enter)
local time:
time || exit (See time , set time and exit the cmd)