Archive for February, 2012

command line for windowes-Suresh Dangi

Calc - Calculator
Cfgwiz32 - ISDN Configuration Wizard
Charmap - Character Map
Chkdisk - Repair damaged files
Cleanmgr - Cleans up hard drives
Clipbrd - Windows Clipboard viewer
Cmd - Opens a new Command Window (cmd.exe)
Control - Displays Control Panel
Dcomcnfg - DCOM user security
Debug - Assembly language programming tool
Defrag - Defragmentation tool
Drwatson - Records programs crash & snapshots
Dxdiag - DirectX Diagnostic Utility
Explorer - Windows Explorer
Fontview - Graphical font viewer
Ftp - ftp.exe program
Hostname - Returns Computer's name
Ipconfig - Displays IP configuration for all network adapters
Jview - Microsoft Command-line Loader for Java classes
MMC - Microsoft Management Console
Msconfig - Configuration to edit startup files
Msinfo32 - Microsoft System Information Utility
Nbtstat - Displays stats and current connections using NetBios over TCP/IP
Netstat - Displays all active network connections
Nslookup - Returns your local DNS server
Odbcad32 - ODBC Data Source Administrator
Ping - Sends data to a specified host/IP
Regedit - registry Editor
Regsvr32 - register/de-register DLL/OCX/ActiveX
Regwiz - Reistration wizard
Sfc /scannow - Sytem File Checker
Sndrec32 - Sound Recorder
Sndvol32 - Volume control for soundcard
Sysedit - Edit system startup files (config.sys, autoexec.bat, win.ini, etc.)
Systeminfo - display various system information in text console
Taskmgr - Task manager
Telnet - Telnet program
Taskkill - kill processes using command line interface
Tskill - reduced version of Taskkill from Windows XP Home
Tracert - Traces and displays all paths required to reach an internet host
Winchat - simple chat program for Windows networks
Winipcfg - Displays IP configuration

Management Consoles

certmgr.msc – Certificate Manager
ciadv.msc – Indexing Service
compmgmt.msc – Computer management
devmgmt.msc – Device Manager
dfrg.msc – Defragment
diskmgmt.msc – Disk Management
fsmgmt.msc – Folder Sharing Management
eventvwr.msc – Event Viewer
gpedit.msc – Group Policy -XP Pro only
iis.msc – Internet Information Services
lusrmgr.msc – Local Users and Groups
mscorcfg.msc – Net configurations
ntmsmgr.msc – Removable Storage
perfmon.msc – Performance Manager
secpol.msc – Local Security Policy
services.msc – System Services
wmimgmt.msc – Windows Management


access.cpl – Accessibility Options
hdwwiz.cpl – Add New Hardware Wizard
appwiz.cpl – dd/Remove Programs
timedate.cpl – Date and Time Properties
desk.cpl – Display Properties
inetcpl.cpl – Internet Properties
joy.cpl – Joystick Properties
main.cpl keboard – Keyboard Properties
main.cpl – Mouse Properties
ncpa.cpl – Network Connections
ncpl.cpl – Network Properties
telephon.cpl – Phone and Modem options
powercfg.cpl – Power Management
intl.cpl – Regional settings
mmsys.cpl sounds – Sound Properties
mmsys.cpl – Sounds and Audio Device Properties
sysdm.cpl – System Properties
nusrmgr.cpl – User settings
firewall.cpl – Firewall Settings (sp2)
wscui.cpl – Security Center (sp2)

Windows Environment Commands

%ALLUSERSPROFILE% – Open the All User’s Profile
%HomeDrive% – Opens your home drive e.g. C:\
%UserProfile% – Opens you User’s Profile
%temp% Opens – temporary file Folder
%systemroot% – Opens Windows folder

Wupdmgr – Takes you to Microsoft Windows Update

General keyboard shortcuts

CTRL+X (Cut)
CTRL+Z (Undo)
DELETE (Delete)
SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
CTRL while dragging an item (Copy the selected item)
CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
F2 key (Rename the selected item)
CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
CTRL+SHIFT with any of the arrow keys (Highlight a block of text)
CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
CTRL+A (Select all)
F3 key (Search for a file or a folder)
ALT+ENTER (View the properties for the selected item)
ALT+F4 (Close the active item, or quit the active program)
ALT+ENTER (Display the properties of the selected object)
ALT+SPACEBAR (Open the shortcut menu for the active window)
CTRL+F4 (Close the active document in programs that enable you to have multiple documents open simultaneously)
ALT+TAB (Switch between the open items)
ALT+ESC (Cycle through items in the order that they had been opened)
F6 key (Cycle through the screen elements in a window or on the desktop)
F4 key (Display the Address bar list in My Computer or Windows Explorer)
SHIFT+F10 (Display the shortcut menu for the selected item)
ALT+SPACEBAR (Display the System menu for the active window)
CTRL+ESC (Display the Start menu)
ALT+Underlined letter in a menu name (Display the corresponding menu)
Underlined letter in a command name on an open menu (Perform the corresponding command)
F10 key (Activate the menu bar in the active program)
RIGHT ARROW (Open the next menu to the right, or open a submenu)
LEFT ARROW (Open the next menu to the left, or close a submenu)
F5 key (Update the active window)
BACKSPACE (View the folder one level up in My Computer or Windows Explorer)
ESC (Cancel the current task)
SHIFT when you insert a CD-ROM into the CD-ROM drive (Prevent the CD-ROM from automatically playing)
CTRL+SHIFT+ESC (Open Task Manager) Dialog box keyboard shortcuts

If you press SHIFT+F8 in extended selection list boxes, you enable extended selection mode. In this mode, you can use an arrow key to move a cursor without changing the selection. You can press CTRL+SPACEBAR or SHIFT+SPACEBAR to adjust the selection. To cancel extended selection mode, press SHIFT+F8 again. Extended selection mode cancels itself when you move the focus to another control.

CTRL+TAB (Move forward through the tabs)
CTRL+SHIFT+TAB (Move backward through the tabs)
TAB (Move forward through the options)
SHIFT+TAB (Move backward through the options)
ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
ENTER (Perform the command for the active option or button)
SPACEBAR (Select or clear the check box if the active option is a check box)
Arrow keys (Select a button if the active option is a group of option buttons)
F1 key (Display Help)
F4 key (Display the items in the active list)
BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)

Microsoft natural keyboard shortcuts

Windows Logo+BREAK (Display the System Properties dialog box)
Windows Logo+D (Display the desktop)
Windows Logo+M (Minimize all of the windows)
Windows Logo+SHIFT+M (Restore the minimized windows)
Windows Logo+E (Open My Computer)
Windows Logo+F (Search for a file or a folder)
CTRL+Windows Logo+F (Search for computers)
Windows Logo+F1 (Display Windows Help)
Windows Logo+ L (Lock the keyboard)
Windows Logo+R (Open the Run dialog box)
Windows Logo+U (Open Utility Manager)

Accessibility keyboard shortcuts

Right SHIFT for eight seconds (Switch FilterKeys either on or off)
Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
SHIFT five times (Switch the StickyKeys either on or off)
NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
Windows Logo +U (Open Utility Manager)

Windows Explorer keyboard shortcuts

END (Display the bottom of the active window)
HOME (Display the top of the active window)
NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder)
NUM LOCK+Plus sign (+) (Display the contents of the selected folder)
NUM LOCK+Minus sign (-) (Collapse the selected folder)
LEFT ARROW (Collapse the current selection if it is expanded, or select the parent folder)
RIGHT ARROW (Display the current selection if it is collapsed, or select the first subfolder)

Shortcut keys for Character Map

After you double-click a character on the grid of characters, you can move through the grid by using the keyboard shortcuts
RIGHT ARROW (Move to the right or to the beginning of the next line)
LEFT ARROW (Move to the left or to the end of the previous line)
UP ARROW (Move up one row)
DOWN ARROW (Move down one row)
PAGE UP (Move up one screen at a time)
PAGE DOWN (Move down one screen at a time)
HOME (Move to the beginning of the line)
END (Move to the end of the line)
CTRL+HOME (Move to the first character)
CTRL+END (Move to the last character)
SPACEBAR (Switch between Enlarged and Normal mode when a character is selected)

Microsoft Management Console (MMC) main window keyboard shortcuts

• CTRL+O (Open a saved console)
CTRL+N (Open a new console)
CTRL+S (Save the open console)
CTRL+M (Add or remove a console item)
CTRL+W (Open a new window)
F5 key (Update the content of all console windows)
ALT+SPACEBAR (Display the MMC window menu)
ALT+F4 (Close the console) • ALT+A (Display the Action menu)
ALT+V (Display the View menu)
ALT+F (Display the File menu)
ALT+O (Display the Favorites menu)

MMC console window keyboard shortcuts

CTRL+P (Print the current page or active pane)
ALT+Minus sign (-) (Display the window menu for the active console window)
SHIFT+F10 (Display the Action shortcut menu for the selected item)
F1 key (Open the Help topic, if any, for the selected item)
F5 key (Update the content of all console windows)
CTRL+F10 (Maximize the active console window)
CTRL+F5 (Restore the active console window)
ALT+ENTER (Display the Properties dialog box, if any, for the selected item)
F2 key (Rename the selected item)
CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console)

Remote desktop connection navigation

CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
ALT+PAGE UP (Switch between programs from left to right)
ALT+PAGE DOWN (Switch between programs from right to left)
ALT+INSERT (Cycle through the programs in most recently used order)
ALT+HOME (Display the Start menu)
CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
ALT+DELETE (Display the Windows menu)
CTRL+ALT+Minus sign (-) (Place a snapshot of the entire client window area on the Terminal server clipboard and provide the same functionality as pressing ALT+PRINT SCREEN on a local computer.)
CTRL+ALT+Plus sign (+) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)

Microsoft Internet Explorer navigation

CTRL+B (Open the Organize Favorites dialog box)
CTRL+E (Open the Search bar)
CTRL+F (Start the Find utility)
CTRL+H (Open the History bar)
CTRL+I (Open the Favorites bar)
CTRL+L (Open the Open dialog box)
CTRL+N (Start another instance of the browser with the same Web address)
CTRL+O (Open the Open dialog box, the same as CTRL+L)
CTRL+R (Update the current Web page)
CTRL+ CTRL+P (Open the Print dialog box)
W (Close the current window)

Note Some keyboard shortcuts may not work if StickyKeys is turned on in Accessibility Options, Some of the Terminal Services client shortcuts that are similar to the shortcuts in Remote Desktop Sharing are not available when you use Remote Assistance in Windows XP Home Edition.

Microsoft Office run commands
If the Microsoft Office is installed you can use following run commands to run its components:

winword – Microsoft Word
excel – Microsoft Excel
powerpnt – Microsoft PowerPoint
msaccess – Microsoft Access
outlook – Microsoft Outlook
ois – Microsoft Picture Manager

Leave a comment

Linux Basic Commands-Suresh Dangi

changing directory / to /etc

[root@pc1 /]# cd /etc

One step back /etc to /

[root@pc1 etc]# cd ..

Go to previous working directory

[root@pc1 /]# cd –

Go to current login user home directory

[root@pc1 etc]# cd ~

Show the contents of /etc in single color

[root@pc1 ~]# dir /etc

Show the contents of /etc in different colors with nature of contents

[root@pc1 ~]# Ls /etc

create a folder on root partition

[root@pc1 ~]# mkdir /disk

Create a folder in /disk

[root@pc1 ~]# mkdir /disk/dir

Create multiple folder in multiple directories with single command

[root@pc1 ~]# mkdir /etc/dir1 /var/dir2 /usr/dir3

Create multiple folder in same directory

[root@pc1 ~]# mkdir dir1 dir2 dir3

Copy a file in directory

[root@pc1 disk]# cp file dir

Copy a file from /disk/file and paste it in /disk/dir/

[root@pc1 disk]# cp /disk/file /disk/dir

Copy a directory with –r option

[root@pc1 disk]# cp -r dir dir2

Copy a file from /disk/file and paste it in /etc with myfile name

[root@pc1 disk]# cp /disk/file /etc/myfile

Remove a file

[root@pc1 disk]# rm file

Remove a file with forcefully option

[root@pc1 disk]# rm –f file

Remove a directory with out –r option and you face will an error

[root@pc1 disk]# rm dir

Remove a directory with –r option

[root@pc1 disk]# rm -r /disk

Remove a directory with forcefully option

[root@pc1 disk]# rm -rf dir

Move /etc/dir1 to /disk/ with different name

[root@pc1 disk]# mv /etc/dir1 /disk/mydir

Rename the folder name mydir to dir

[root@pc1 disk]# mv /disk/mydir /disk/dir

Rename the file name with myfile

[root@pc1 disk]# mv file myfile

Read a file page by page with less command

[root@pc1 disk]# less /etc/grub.conf

Read a file page by page with more command

[root@pc1 disk]# more /etc/qrub.conf

Read first ten lines of grub.conf

[root@pc1 disk]# head /etc/grub.conf

Read last ten lings of grub.conf

[root@pc1 disk]# tail /etc/grub.conf

Read first 12 lines with –n option

[root@pc1 disk]# head -n 12 /etc/grub.conf

Read last 11 lines with –n option

[root@pc1 disk]# tail -n 11 /etc/grub.conf

Copy the contents of /etc/grub.conf in /disk/file

[root@pc1 disk]# cat /etc/grub.conf > /disk/file

Append the contents /etc/mtab in /etc/file

[root@pc1 disk]# cat /etc/mtab >> /disk/file

Merging tow commands with pipe sign output of the first command is input of second command

[root@pc1 disk]# cat /etc/squid/squid.conf I more

Count the total lines of squid.conf

[root@pc1 disk]# cat /etc/squid/squid.conf I wc -L

Show only spool words in squid.conf

[root@pc1 disk]# cat /etc/squid/squid.conf I grep spool

Flush the contents of file

[root@pc1 disk]# cat /dev/null > /var/log/messages

Leave a comment

Basic Switch Settings You Must Know-Suresh Dangi

There are five configurations a network administrator should apply to a newly provisioned switch or router. Although application of these configurations may seem like common sense, 90% of devices I see are missing at least one of these settings, and about 75% are missing two or more. Use this checklist as an action item to verify your existing devices have these settings, at minimum, and integrate these in to any templates or provisioning documents you use. You’ll appreciate the results of the consistency this adds to your network management and monitoring.

Define a default gateway or default route
Let’s start with the fantastically easy one–a management IP and default gateway. Obviously, you can’t manage a device across the network unless it has, at bare minimum, a management IP address. Instead of harping on the obvious, instead take note that many times when edge devices are provisioned, an IP address is configured but the default gateway or default route is forgotten or omitted.

What happens when this configuration is missing? Those edge switches will hum along happily until one of three things happens:

Your management tool is installed or moved to a different subnet.
You try to manage the switch from a different network or subnet.
You begin adding other VLANs or subnets to the switch.

Without a default gateway or route off of the network the switch is using, traffic may reach the switch, but it won’t find its way back off that network. You won’t believe how many edge devices are in the wild with this grievous omission, often resulting in the switch becoming unmanaged, by virtue of the management tools not able to see it.

Cisco & HP Networking:
# ip default-gateway
# ip route

Set the time
If I could ask administrators to set only one configuration out of the box after the basic IP settings, I’d ask for this: the correct time. Correct time on a switch is vital when troubleshooting the device. A string of log entries dated 1/1/90 are useless to network administrators troubleshooting a problem.

The three most popular ways to set time on a device are manual time settings, TimeP or Network Time Protocol (NTP), and Simple NTP (SNTP). You should really have a time server in your environment to keep the network all in sync. If you don’t have a time server now, you can very easily add one. In Windows Server environments, a few clicks will have you up and running with SNTP in less than 5 minutes. You can also use public (Internet-hosted) time servers, although you shouldn’t put yourself in a position to force each switch to call out over the Internet for time. As a last resort, set the time manually, but, by all means, set it somehow.

# ntp server
# clock timezone
# show clock

HP Networking:
# ip timep manual
# timesync timep
# clock timezone
# sntp server
# sntp unicast
# timsync sntp
# show time

Enable neighbor discovery
Neighbor discovery protocols are essential for network administrators and management tools to accurately construct a view of the network topology. Each manufacturer has its own supported mix of neighbor discovery protocols, loosely based on how standards-focused that vendor is and how much it wants to pay in royalties to use proprietary protocols. The two most widely used are LLDP (Link Layer Discovery Protocol), an IEEE standard, and CDP (Cisco Discovery Protocol). Support varies by brand and at times even by model or firmware versions. What you may see in some devices is LLDP supported for listening and talking, but only the only CDP support is for listening. Others may offer equal capabilities for both protocols.

Enabling all supported neighbor discovery methods is highly recommended. The information it provides lets you immediately locate neighboring switches and even media endpoints such as phones and access points that use LLDP-MED, an extension of LLDP. Not only can you see where these devices are connected, you can get details of the device type, its host name, IP address and even what port it’s connected to on the other end. In a similar fashion, your network monitoring and management tools will use these protocols to crawl the network, discover new devices, and correctly identify and show interswitch links.

Cisco: CDP is enabled by default, Enable LLDP
# lldp run
# show lldp neighbors

HP Networking: LLDP is enabled by default. Enable CDP receive only support
# show lldp info remote
# show cdp neighbors

Configure logging and traps
Notifications of events on the network are a critical component of monitoring, troubleshooting and real-time alerting. Most switches offer two primary means of sending this data to a central repository: logging events via syslog and trap events via SNMP ((Simple Network Management Protocol). Configuration of both is simple, usually varying minimally from switch to switch and even from brand to brand.

Most organizations have a syslog server or a management tool configured to receive SNMP traps. If yours doesn’t have such an application, I’d strongly encourage you to use this opportunity to investigate your options. If you don’t have budget or time, look at your existing management tools and you’ll likely find something you can use already in production. If not, there are a variety of free syslog and SNMP tools; just make sure you download free tools from a source you trust.

Cisco & HP Networking:
# logging
# snmp-server host

Add custom SNMP communities
SNMP is used to manage or monitor all types of devices in a network, including switches, servers and even desktops. SNMP allows us to define different community strings that are mapped to different access rights. Most simply, we have a read-only string and a read-write string. The read-only string lets monitoring tools see and gather information from the device, whereas the read-write string allows management tools to make modifications and configuration changes to the device. By default, switches most often have either no predefined strings or they use a combination of public and private.

Some of you may feel this should be included with the full management configuration (defining local users or RADIUS/TACACS authentication, enabling secure management with SSH and HTTPS), but I define it as one of the recommended out-of-the-box settings. Within an organization, you likely have only a set or two of custom SNMP community strings, and these strings aren’t going to change from the time you order the switch, unbox it and then deploy it. Initial omission of the strings is usually an oversight, or network admins consciously leave it out and figure they’ll go back and add it later. Your management tools should already be set to talk to your devices using your custom SNMP strings, so go ahead and start off on the right foot by setting it early on the device. Remember, they are case-sensitive, and you’ll avoid the frustration of typos if you include these in a template or at least copy-paste from a base text document. Incorrect SNMP strings are frustrating, especially in larger environments. Correct strings will let your device be seen and managed immediately by all your management and monitoring applications.

# snmp-server community ro
# snmp-server community rw
# show snmp

HP Networking:
# snmp-server community operator restricted
# snmp-server community manager unrestricted
# show snmp-server

Leave a comment

How to send large media files to any mobile phone or email address-Suresh Dangi

Almost all email providers restricts the attachment file sizes of emails sent. In Gmail, users are only able to attach files that are less than 225MB, and most email providers; restrictions are even less than that. Text message attachments are just as, if not more so, restricted.

The WizDrop is a quick way that you can send a media file up to 100MB to any mobile phone or email address.
To use the WizDrop application, simply follow these instructions:
Enter the email address in the From box
Next to the Number 2, click the Browse button and then upload your media file. You will be able to load any video, audio or picture file, but zip files will unfortunately not work. The size limit here is 100MB, so videos larger than this will need to be cut into pieces.
While the file is uploading, users can add a subject line and message to the email. These will only appear in the emails. If you are sending the file to a mobile phone then simply ignore this option
Enter the email address and any numbers of the contacts you’d like, and separate the different information with semi colons
Finally enter the security code. If it states that you security code is invalid, simply click on the security code to generate a new one
Now click the Drop button and a message will be generated that states that your file has been dropped. Almost instantly your contacts will receive a link via email or text message to download the file
Gmail tends to label WizDrop messages as spam, so ensure to inform your friends that they are to expect a file before sending it, and that they need to keep an eye on their spam folder. WizDrop is a quick and easy way to share large files via email and text, but is a bit quirky at times too. The security code feature needs a bit more attention from its developers, and the upload and download speeds of the files are mediocre at best. But, when all is said and done, it is still much faster than many of the other file sharing applications and offers out there.

Leave a comment