Thursday 11 July 2013

How to use Putty for C++ programs(( Only for students ))

PuTTY: the Telnet and SSH client itself
            An SSH client is a software program which uses the secure shell protocol to connect to a remote computer.

            The programs written in putty doesn't store in your System , but stored in external server through internet. So that There is no data lost due to system failure. PuTTY provides security to data access.

How to Download PuTTY

             PuTTY is a freeware . you can easily download from internet.

             Click on this link to directly download PuTTY for any Windows 32 bit Operating System
How to Start with PuTTY
             After downloading putty we can directly use that. No need of Installation and Highly Portable.

            
In this application interface we can customize
it's appearance and a lot can be done.


Before we want to use, first we have to connect
to the server using IP address and SSH protocol
(recommended).

we can use any protocol to access
server but internet connection was must to connect


then click open to use it.


        
then it opens a command prompt asking for log in details in case of no network failure.


Then enter your login details
most of institutions offer your login name as same as your ID number

it prompts for password to authenticate your details and allows you to access server based on accessing permissions


Basic and mandatory commands necessary to use (PuTTY) shell script :

Syntax:            vi <file name along with extension>
Ex:                    vi<space>test.cpp
Functionality:   It is used to open a file. if it was not available or not created before.
                          it creates the file and opens it immediately after pressing "enter" key.

Syntax:            ll
Ex:                    ll
Functionality:   It is used to display the list of files and directories available in the present directory


Syntax:  
          pwd
Ex:                    pwd
Functionality:   To check our present working directory (pwd) or location.


Syntax:
           passwd
Ex:                    passwd
Functionality:   To change the login password of the current user .


Syntax:            mkdir <Directory name>
Ex:                    mkdir<space>cpp
Functionality:  
To create a directory (folder) in the present directory or location.


Syntax:           
cd <Directory name>
Ex:                    cd<space>cpp
Functionality: 
  To open an existing directory. if not exists it will display error


Syntax:
           cp <source file name> <destination file name>
Ex:                    cp<space>test.cpp<space>demo.cpp
Functionality:   It is used to copy the content of source file to destination file
                          If destination file doesn't exist it creates the file and copies the content.


Syntax:  
          rm <file name>
Ex:                    rm<space>test.cpp
Functionality:  It is used to remove the file from file System.


Syntax:
           cd ..
Ex:                    cd<space>..
Functionality:   To come out from the current directory i.e.: to move up from current directory


Syntax:    
        cd /
Ex:                    cd /
Functionality:   To move user to the root directory.

How to Access (Read, Write, Save and Close) the file System

          
when we open a file in VI editor it opens in VI command mode. so that it treats each letter as command

Press 'a', 'i', 'o to open in append mode(though they have different meaning to compiler)

press "Esc" button to leave the append mode and returns to VI command mode (Not returns to shell)
press
         ":wq" or ":x" to save the modifications on the file and returns to shell
         ":q" to close the file without saving the modifications and returns to shell

                      to copy the content select the source using mouse by holding left key
   to paste the content right click on the editor. it appends the buffer (Copied data) to file at the cursor.

No comments:

Post a Comment