Friday 29 July 2011

Developer's Choice: Shell Script :

Developer's Choice: Shell Script :: "' Shell Script is series of command written in plain text file . Shell script is just like batch file is MS-DOS but have more power than..."

Thursday 28 July 2011

Shell Script :


"Shell Script is series of command written in plain text file. Shell script is just like batch file is MS-DOS but have more power than the MS-DOS batch file."

Use of Shell Script

  • Shell script can take input from user, file and output them on screen.
  • Useful to create our own commands.
  • Save lots of time.
  • To automate some task of day today life.
We may find all running process by using:-
        $ ps ef
                                         
Find process with the specific_name(For eg- process-name)
       $ ps ef | grep process-name

    Wednesday 27 July 2011

    UNIX : KERNEL

    What Kernel Is?
    Kernel is heart of Linux Os.
    It manages resource of Linux Os. Resources means facilities available in Linux. For e.g. Facility to store data, print data on printer, memory, file management etc .

    Kernel decides who will use this resource, for how long and when. It runs your programs (or set up to execute binary files).

    The kernel acts as an intermediary between the computer hardware and various programs/application/shell.
                     

    It's Memory resident portion of Linux. It performance following task :-

    I/O management
    Process management
    Device management
    File management
    Memory management

    Linux Shell  
    Computer understand the language of 0's and 1's called binary language.
    In early days of computing, instruction are provided using binary language, which is difficult for all of us, to read and write. So in Os there is special program called Shell. Shell accepts your instruction or commands in English (mostly) and if its a valid command, it is pass to kernel.
    Shell is a user program or it's environment provided for user interaction. Shell is an command language interpreter that executes commands read from the standard input device (keyboard) or from a file.
    Shell is not part of system kernel, but uses the system kernel to execute programs, create files etc.

    Types Of Shell
    BASH ( Bourne-Again SHell )
    CSH (C SHell)
    KSH (Korn SHell)
    TCSH

    Note that each shell does the same job, but each understand a different command syntax and provides different built-in functions.
    Any of the above shell reads command from user (via Keyboard or Mouse) and tells Linux Os what users want. If we are giving commands from keyboard it is called command line interface ( Usually in-front of $ prompt, This prompt is depend upon your shell and Environment that you set or by your System Administrator, therefore you may get different prompt ).
    To find your current shell type following command
    $ echo $SHELL




    Monday 25 July 2011

    SQL SERVER

    FIND NAME OF DATABASE IN SQL SERVER

    select * from sys.databases

    FIND NAME OF TABLES IN DATABASE

    use DATABASE_NAME
    go
    select * from sys.tables
    go

    FETCH DATA FROM A TABLE

    SELECT * FROM TABLE_NAME

    Thursday 21 July 2011

    FTP : File Transfer from Local System to Server

    Step 1 : Open Command Prompt
    Step 2 : Go to Source Directory
    Step 3 : ftp Ip_Adddress(For eg: ftp 192.168.99.53)
    Step 4 : login Credentials
    Step 5 : Go to Destination Directory
    Step 6 : bin
    Step 7 : mput (OR mget)
    Step 8 : bye

    REMARK : "mput" and "mget" is used to transfer multiple file from source to destination and destination to source directory respectively.
    ("put" and "get" command can be used for single file transfer )

    Wednesday 20 July 2011

    XML encoding list


    XML encoding list
    [96264 urls; 154 unique values]


    PopularityValueFrequency
    1iso-8859-154572
    2utf-827052
    3iso-8859-23919
    4shift_jis2464
    5utf-161688
    6windows-12511291
    7windows-12501127
    8iso-8859-9832
    9windows-1252731
    10euc-jp668
    11iso-8859-15615
    12us-ascii181
    13big5155
    14gb2312148
    15windows-125784
    16windows-125578
    17iso-2022-jp54
    18iso-8859-749
    19windows-125644
    20iso-8859-1338
    21utf832
    22\"utf-8\"28
    23tis-62026
    24shift-jis19
    25koi8-r19
    26euc-kr16
    27windows-125414
    28charset=iso-8859-113
    29iso8859-113
    30\"iso-8859-1\"12
    31latin112
    32cp125111
    33iso 8859-1510
    34x-sjis9
    35"windows-1252"9
    36iso 8859-19
    37windows-8747
    38iso8859-26
    39charset6
    40iso-8859-8-i6
    41gbk6
    42iso-8859-46
    43windows-12535
    44\"iso-8859-2\"4
    45windows-31j4
    46win-12504

    Monday 18 July 2011

    Windows NT startup process

    The Windows NT startup process is the process by which Microsoft's Windows NT, Windows 2000, Windows XP and Windows Server 2003 operating systems initialize.

    Boot Sequence

    • Upon POWER ON, the CPU runs the instruction located at the memory location 0xFFFF0 of the BIOS.
    • 0xFFFF0 contains a JUMP Instruction pointing to the BIOS start-up program, which then runs the POST to check & initialize required devices.
    • The BIOS checks a pre-configured list of Non-Volatile Storage Devices (Boot Device Sequence)
    • A bootable device has the last 2 bytes of the first sector containing 0xAA55 (Boot Signature)
    • Once identified, BIOS loads the Boot Sector contents (from MBR in case of a HDD) to memory & transfers execution control to the boot code.
    • MBR Code looks for a bootable partition from its Partition Table.
    • The MBR code loads the boot sector code from that partition and executes it.
    • The Boot Sector Code is mostly OS Specific which loads and executes the OS Kernel.
    • If no Active Partition or invalid Active Partition Boot Sector, the MBR loads a secondary Loader to select the partition via user input.
    From that point, the boot process continues as follows:

    An NTLDR file, located in the root folder of the boot disk, is composed of two parts. The first is the StartUp module and immediately followed by the OS loader (osloader.exe), both stored within that file. When NTLDR is loaded into memory and control is first passed to StartUp module, the CPU is operating in real mode. StartUp module's main task is to switch the processor into protected mode, which facilitates 32-bit memory access, thus allowing it to create the initial Interrupt descriptor table, Global Descriptor Table, page tables and enable paging. This provides the basic operating environment on which the operating system will build. StartUp module then loads and launches OS loader.



    Disable/Enable Windows default debugger Dr. Watson

    If you feel it's useless for you anyway, just follow these steps to turn off.

    1.Go to Start Menu -->> Run and type regedit.exe then press Enter.

    2.Browse to the following registry. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug

    3.Click the AeDebug key, and then click Export Registry File on the Registry menu. Save the file and remember it.

    4.Then you can delete the AeDebug key.
     
    That's it! Whenever any programs crash again, Windows won't ask you whether you want to send data to Microsoft or not.

    If you change your mind and want to enable Dr. Watson back. It's easy.
    * Double-click the file you save in step 3.
    * And then go to Start -->> Run -->> cmd.exe
    * At the command prompt, type drwtsn32 -i