Ad

Saturday, March 3, 2012

SOME USEFUL COMMAND PROMPT TRICKS


openfiles /query

If you are running a system and you want to know who has files open on your computer, this command will provide you a list of those users and the files that they have open.

    Note: If you get an error saying The system global flag ‘maintain objects list’ needs to be enabled to see local opened files, you can fix this issue by typing openfiles /local on. You will have to reboot the system but it will resolve the issue.

Recover Information From A Corrupt File

recover filename.ext

If you have a disk with damaged sectors, you can attempt to recover as much information as possible from the damaged file. Data that is not damaged can be retrieved but data in damaged sectors will be lost.
rexec remotePC defrag C: /F

This command used the rexec command to force a defragment of the C: drive on the computer named remotePC. You can use whatever you want to for the command (I just used defrag C: /F as an example). This is very useful for remote maintenance.
Retrieve Detailed System Information
tasklist
taskkill /im programname.exe /f

It’s always good to know what is running on your system. This is the command line version of the processes tab in Taks Manager.
Kill A Program


dir *.ext /s /b > files.txt

This command line will create a file called files.txt. When you open this file, there will be a complete list of all the files in that directory and all subdirectories with the .ext extension. You can then open up this text file in any text editor and work this the information.By changing the ext part, you can select different files. For example, if you wanted to list all of the PDF documents, you would type:

dir *.pdf /s /b > files.txt
ipconfig /all

This will retrieve a pile of information about your network connection and IP information. From this command, you can get:

    Host Name
    Primary DNS Suffix
    Node Type
    IP Routing Enabled
    WINS Proxy Enabled
    DNS Suffix Search List
    Connection-specific DNS Suffix
    Network Adapter Description
    Physical (MAC) Address
    DHCP Enabled
    IP Address
    Subnet Mask
    Default Gateway
    DNS Servers 
openfiles /query

If you are running a system and you want to know who has files open on your computer, this command will provide you a list of those users and the files that they have open.

    Note: If you get an error saying The system global flag ‘maintain objects list’ needs to be enabled to see local opened files, you can fix this issue by typing openfiles /local on. You will have to reboot the system but it will resolve the issue.
Monitor Port Activity

netstat -a 30
This will show you all of the TCP/IP ports that are being used on your system and what they are connecting to (or being connected from). It will continue to monitor these ports and refresh the information every 30 seconds. You can change the refresh rate by changing the number at the end of the command.
Reboot a Remote Computer

shutdown -r -f -m \\remotePC –c

 "System will be rebooted in 20 seconds

Automatically Defragment C: Daily

schtasks /create /tn "Defrag C" /tr "defrag c: /f" /sc daily /st 23:00:00 /ru "System"


This will set your computer to automatically perform a complete defrag of the C: drive each day at 11:00:00 PM (23:00:00). It does this by creating a scheduled task called Defrag C. It will run this command under the computer’s system account.

Courtesy :    http://nfpemavelikaradivision.blogspot.com

Thursday, March 1, 2012

CAT5 CABLE AND RJ45 CONNECTOR


How to correctly assemble a CAT-5 cable to RJ45 connectors for regular network cables as well as crossover cables.
The CAT-5 is a standard cable which has four twisted pairs of colours. It is easy to crimp a RJ45 connector to CAT-5 cable and make it into a straight cable or cross the cable as required. To make a straight cable, the ends must be crimped in the same way at each end. When making a crossover cable, some wires of certain colours have to be reversed.

CAT-5 cable is usually divided into 4 twisted pairs of colours:

Orange / orange-white
Green / green-white
Blue / white and blue
Brown / brown-white

Straight Cable Colour Code

To make a straight cable, the tips must be crimped typically the same way ateach end by respecting the twisted pair size.

In general, the colour code used is:

1) orange-white
2) orange
3) green-white
4) Blue
5) blue-white
6) Green
7) brown-white
8) brown

Crossover Cable Colour Code


For a crossover cable, swap 1 with 3, and 2 with 6, in the list above. This gives:

1) green-white
2) green
3) orange and white
4) Blue
5) blue-white
6) orange
7) brown-white
8) brown

Standard EIA / TIA 568 (A &B) Colour Code

Straight cable

1) white-green / white-green
2) green / green
3) white-orange / white-orange
4) Blue / blue
5) white-blue / white-blue
6) Orange / orange
7) white-brown / white-brown
8) brown / brown

Crossover cable 10/100baseT Colour Code


1) white-green / white-orange
2) Green / orange
3) white-orange / white-green
4) Blue / blue
5) white-blue / white-blue
6) Orange / green
7) white-brown / white-brown
8) brown / brown

Complete crossover cable or crossgigabit Colour Code

On Gbic 1000BaseT eg

1) white-green / white-orange
2) Green / orange
3) white-orange / white-green
4) Blue / white-brown
5) white-blue / brown
6) Orange / green
7) white-brown / blue
8) Brown / white-blue

Note:

Many Gigabits (10/100/1000 multi speed) are auto MDI / MDIX and automatically adapt to the type of cable connected.