Wednesday 20 February 2013

Windows commands

2.3.2 Commands and tools (Windows) :-

Commands
1)date............ Display or set the date of the system
2)time............ Display or set the time of the system
3)ver............. Display the MS-DOS version that is being used
4)dir.............. Display the list of subdirectories and files of a directory
5)cls.............. Clear the screen
6)mkdir,
md directory..Make a directory with the name “directory”
Example: md tools
7)chdir, cd directory.. Display the name or change the current directory to “directory”
Example: cd tools
8)rmdir, rd directory.. Delete the directory with the name “directory”
Example: rd tools
9)tree directory....... Display the structure of folders of a path in text-graphic format
Example: tree c:\tools
10)chkdsk......... Check a disk and show a status report
11)mem........... Show the amount of memory used and free in the system
12)rename,
ren source dest
.......Change the name of files
Example: ren oldname newname
13)copy source dest....... Copy one or more files to another location
Example: copy c:\tools\myfile.txt c:\tmp
14)move source dest....... Move files and change the name of files and directories
Example: move c:\tools c:\tmp
15)type file............. Type the content of one or more text files
Example: type c:\tools\myfile.txt
16)more file........... Display the information screen by screen
Example: more c:\tools\myfile.txt
17)delete, del file....... Delete one or more files
Example: del c:\tools\myfile.txt

you can check many commands from net

Note: The words in italics are not commands, and must be replaced by the desired
values. Some of the commands can be used by typing either their long version or short
version; for example, "delete" and "del‚" are the same command.

Tools :-

1)ping host Verify contact with the machine “host”
The command ping sends "packets" using ICMP (Internet Control
Message Protocol) to another computer, to learn whether it is
accessible through the network. In addition, it shows a statistical
summary about the percentage of packets that have not been
answered and the response time. The name of the machine can
be used directly or its IP address.
Examples: ping http://www.google.com
ping 193.145.85.2
Some options are:
- n N: send N packets
- t: ping the specified host until stopped (press CTRL+C to end)
To see more options: ping /h

2)tracert host Show the route that packets follow to reach the machine “host”
The command tracert is the abbreviation of trace route, which
allows you to learn the route that a packet follows from the origin,
(your machine) to the destination machine. It can also tell you
the time it takes to make each jump. At the most, 30 jumps will be
listed. It is sometimes interesting to observe the names of the
machines through which the packets travel.

Examples: tracert http://www.google.com
tracert 193.145.85.2
Some options are:
- h N: to specify N, at the most, jumps.
- d: to not show the names of the machines.
To see more options: tracert

3)ipconfig Display information on the active interfaces (ethernet, ppp, etc.)
in the computer.
Some options:
/all: to show more details
/renew name: renews connection with “name” when automatic
configuration with DHCP is used.
/release name: deactivates all matching connections when
automatic configuration with DHCP is used.
To see more options: ipconfig /?

4)route print Display the routing table
The command route serves to define static routes, to erase routes
or simply to see the state of the routes.
Some options:
print: to show the list of routes.
delete: to delete a route.
add: to add a route.
To see more options: route/?

5)netstat Displays information on the status of the network and established
connections with remote machines.
Some options:
-a: To sample all the connections and listening ports
-n: to display addresses and port numbers in numeric form
-e: to sample Ethernet statistics
For example: netstat - an
To see more options: netstat/?