Thursday, 31 May 2012

Linux Basic Commands and use.


                                             
      Linux is basically command based Operating System.Here I will put some basic Linux commands.






Calender

cal: Command to see calender for any specific month or a complete year
◮ cal [ [month] year]
$ cal april 2009
April 2009
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30

date

◮ date: displays the current date
$ date
Tue Apr 21 21:33:49 IST 2009
kuteer$ date +"%D %H:%M:%S"
04/21/09 21:35:02

Options:
◮ d - The da of the month (1-31)
◮ y - The last two digits of the year
◮ H,M,S - Hour Minute and second respectively
◮ D - the date in mm/dd/yy
◮ For more information see man date


echo and printf


echo: Print message on the terminal
◮ usage: echo “<message>”
$ echo "Welcome to the workshop"
Welcome to the workshop
◮ printf: Print the formatted message on the terminal
◮ Syntax of printf is same as C language printf statement
◮ usage: printf “<formatted message”
$ printf "the amount is %d\n" 100
the amount is 100

Calculator


bc: A text based calculator
$ bc
2*10+20-9+4/2 [Input]
33 [Output]
[ctrl+d] [Quit]
◮ xcalc is graphical based calculator

passwd: Changing your password


passwd command allows you to change your password
kuteer:˜/workshop$ passwd
Changing password for srihari.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

WHO: Who are the users?


who command tells you the users currently logged on to
the system
kuteer:˜$ who
srihari pts/0 2009-04-15 11:58 (:10.129.41.3)
nithin pts/1 2009-04-15 16:09 (:10.129.20.5)
avadhut pts/2 2009-04-13 14:39 (:10.129.45.20)
anil pts/3 2009-04-13 16:32 (:10.129.23.45)

Changing the File attributes


chmod Changing the permissions of the file
kuteer:˜$ chmod o+x Testing.java
kuteer:˜$ ls -l Testing.java
-rw-r--r-x 1 srihari srihari 3570 2009-03-23 10:kuteer:˜$ chmod 655 Testing.java
kuteer:˜$ ls -l Testing.java
-rw-r-xr-x 1 srihari srihari 3570 2009-03-23 10:

Changing ownership


chown command is used for changing the ownership and
also group of the file
kuteer:˜$ chown guest Testing.java
kuteer:˜$ ls -l Testing.java
-rw-r-xr-x 1 geust srihari 3570 2009-03-23 10:52
kuteer:˜$ chown guest:guest Testing.java
kuteer:˜$ ls -l Testing.java
-rw-r-xr-x 1 geust guest 3570 2009-03-23 10:52 Testing

File system commands


◮ Deleting Files - rm
◮ Copying and moving files - cp, mv
◮ Creating directories - mkdir
◮ Deleting Empty Directory - rmdir
$ rm Testing.java
//deletes the file Testing.java
$ cp Testing.java Copy.java
//creates the copy of Testing.java
$ mv Testing.java Test.java
//renames the file Testing.java to Test.java
$ mkdir newDir
//Creates directory newDir
$ rmdir newDir
//deletes directory newDir newDir should be empty

cat : Concatenate Files


◮ cat command is used to display the contents of a small file
on terminal
◮ usage: cat <file name>
$ cat sample3.txt
Unix (officially trademarked as UNIX, sometimes
......
◮ cat when supplied with more than one file will concatenate
the files without any header information
$ cat sample3.txt sample4.txt
/*contents of sameple3.txt*/
/*Followed by contents of sample4.txt without any

tac : concatenate files in reverse


tac command is used to display the contents of a small file
in reverse order on terminal
◮ usage: tac <file name>
$ tac sample3.txt
/*displays sample3.txt in reverse order*/
◮ tac when supplied with more than one file will concatenate
the reverse contents of files without any header information
$ tac sample3.txt sample4.txt
/*print sample3.txt in reverse order*/
/*print sample4.txt in reverse order without any

more, less : paging output


◮ more and less commands are used to view large files one
page at a time
◮ usage: more <file name>
◮ usage: less <file name>
$ more sample1.txt
/*sample1.txt will be displayed one page
at a time */
$ less sample1.txt
/*sample1.txt will be displayed one page
at a time */
◮ less is the standard pager for linux and in general less is
more powerful than more


wc : statistic of file


◮ wc command is used to count lines, words and characters,
depending on the option used.
◮ usage: wc [options] [file name]
$ wc sample1.txt
65 2776 17333 sample1.txt
◮ Which means sample1.txt file has 65 lines, 2776 words,
and 17333 characters
◮ you can just print number of lines, number of words or
number of charcters by using following options:
◮ -l : Number of lines
◮ -w : Number of words
◮ -c : Number of characters

cmp: comparing two files


◮ cmp command is used to compare two files whether they
are identical or not
◮ usage: cmp <file1> <file2>
◮ The two files are compared byte by byte and the location of
the first mismatch is printed on the screen
◮ If two files are identical, then it doesnot print anything on
the screen
$ cmp sample1.txt sample2.txt
sample1.txt sample2.txt differ: byte 1, line 1
$ cmp sample1.txt sample1_copy.txt
$ /*No output prompt returns back*/

comm : what is common?


◮ comm command displays what is common between both
the files
◮ usage: comm <file1> <file2>
◮ The input files to comm command should be sorted
alphabetically
$ comm sample5.txt sample6.txt
anil
barun
dasgupta
lalit
shukla
singhvi
sumit

gzip and gunzip


◮ gzip command is used to compress the file, and gunzip is
used to de-compress it.
◮ usage: gzip <file name>
◮ It provides the extension .gz and removes the original file
$ wc sample_copy.txt
65 2776 17333 sample_copy.txt
$ gzip sample_copy.txt
$ wc sample_copy.txt.gz
26 155 7095 sample_copy.txt.gz
◮ The compression ratio depends on the type, size and
nature of the file
◮ usage: gunzip <file name with.gz>
$ gunzip sample_copy.txt.gz
$ /*do ls and you can see the original file*/
◮ If you want to compress the directory contents recursively,
use -r option with gzip command and unzip it use the
same option with gunzip command

tar : The archival program


◮ tar command is used to create archive that contains a
group or file or entire directory structure.
◮ It is generally used for back ups.
◮ usage: tar [options] <output file.tar> <file1 or dir> . . .
◮ The following are the options:
◮ -c Create an archive
◮ -x Extract files from archive
◮ -t Display files in archive
◮ -f arch Name the archive arch
$ tar -cvf compression.tar compression
compression/ //v for verbose
compression/temp/
compression/temp/sample2.txt
compression/sample1.txt

zip and unzip: compressing and archiving


◮ zip command can be used for archiving as well as
compressing the contents of the directory or the file
◮ usage: zip [options] output.zip <files to be zipped or
directory>
$ zip sample1.zip sample1.txt
//will create sample1.zip file
◮ Use -r option to recursively zip the contents of the directory
$ zip -r compression.zip compression
// will create compression.zip file
◮ To un-compress the file use unzip command
$ unzip compression.zip
// will uncompress the compression.zip file

Filters


◮ Filters are commands which accept data from standard
input, manupulate it and write the results to standard
output
◮ head command displays the top of the file, when used
without any option it will display first 10 lines of the file
$ head sample1.txt
/*display first 10 lines*/
◮ Similarly tail command displays the end of the file. By
default it will display last 10 lines of the file
$ tail sample1.txt
/*display last 10 lines*/
◮ tail or head with -n followed by a number will display that
many number of lines from last and from first respectively
$ head -n 20 sample1.txt
/* will display first 20 lines*/
$ tail -n 15 sample1.txt
/* will display last 15 lines */

cut : cutting columns


◮ cut command can be used to cut the columns from a file
with -c option
◮ usage: cut -c [numbers delemited by comma or range]
<file name>
$ cut -c 1,2,3-5 students.txt
1 ani
2 das
3 shu
4 sin

cut : cutting fields


◮ With -f option you can cut the feilds delemited by some
character
$ cut -d" " -f1,4 students.txt
1 Mtech
2 Btech
3 Mtech
◮ -d option is used to specify the delimiter and -f option used
to specify the feild number

paste : pasting side by side


◮ paste command will paste the contents of the file side by
side
$ paste cutlist1.txt cutlist2.txt
1 Mtech 1 anil H1
2 Btech 2 dasgupta H4
3 Mtech 3 shukla H7
4 Mtech 4 singhvi H12
5 Btech 5 sumit H13


sort : ordering a file


◮ sort re-orders lines in ASCII collating sequenceswhitespaces
first, then numerals, uppercase and finally
lowercase
◮ you can sort the file based on a field by using -t and -k
option.
$ sort -t" " -k 2 students.txt
/* sorts the file based on the second field
using the delimiter as space*/

grep : searching for a pattern


◮ grep scans its input for a pattern, and can display the
selected pattern, the line numbers or the filename where
the pattern occurs.
◮ usage: grep options pattern filename(s)



























Thursday, 24 May 2012

Windows Virtual PC


                             Windows Virtual PC 

It is a  virtualization program for Microsoft Windows. If you are running Windows Vista or Windows XP on your physical machine, you can still use Microsoft Virtual PC 2007 to run multiple operating systems at the same time on the same physical computer. Switch between virtual machines with the click of a button. Use virtual machines to run legacy applications, provide support, train users, and enhance quality assurance.


This picture shows a Windows 7 Computer with virtual PC installed.  Running Windows 7 and Windows XP together.


                                      Click here to download Virtual PC today.


Sunday, 20 May 2012

How to call from computer to mobile.

There are so many software available now to make use a computer as a telephone. Here we will see some software which enable us to make call.The internet giants like Google, Yahoo also provide this service but only to make PC-to-PC for free.If you want to make a call from PC-to-Mobile require a little amount to be paid.OK.
Google talk, Yahoo messenger, all may be familiar with you, so that here I will discuss some other services. 


                                                   
Skype offer services like video calling, call to land phone and mobile, instant message sending options etc....
You have to take an account to do so.But they will charge a little to make call form PC-to-mobile.
One of the major advantage is that most of the mobile (smartphone) either has Skype installed or can be installed.The software is freely available from Nokia OVI store,samsungapps, mobile9 etc...


                                       To take an account in Skype   click here


                                                    

Evaphone is a VoIP service let you to make free International call.They offers a free trial service, for that you doesn't want take the account.

                                              click here to go and enjoy Evaphone.


                                              

This is a free piece of software that turns your PC into a second telephone line and allows you to make
 Low Cost calls to any landline or mobile in the World, using the Tpad VoIP Network and your broadband
 connection.Most people use the Softphone with a headset (that includes a microphone) linked to their PC 
or Laptop. Once the phone is downloaded and setup with your Tpad settings, you can start making calls by 
simply dialling the full International number e.g. 0092301234XXX.
             This software is freely available from their website. click here  to download the software.




Your next question may be related with the configuration. Am I correct?
Yes the answer is here, all of these companies provides video tutorials or PDF files as guide. So don't worry
about the configuration.
                                                                enjoy free calls......




Sunday, 13 May 2012

DHCP in Windows Server 2008


IP Address  is Internet Protocol Address.This address is assigned to every device to communicate within the network.
192.168.0.1 is one of the example of an IP address.If we assign this address to one computer, the second computer address can be 192.168.0.2 , and the third may be 192.168.0.3 and so on............ 

Let us come to our topic DHCP. First I will tell what is DHCP? DHCP is a service given by most of the server operating system to automate the IP address process. ie, in a corporate company may have more than 100 computers, it may be a difficult task for the network administrator to manage all of these settings.So that he will create a DHCP server.We can do that in 2008 server, before we move on let us check what are the advantages of DHCP server in a network.

Benefits of DHCP

In Windows Server 2008, the DHCP Server service provides the following benefits:
  • Reliable IP address configuration. DHCP minimizes configuration errors caused by manual IP address configuration, such as typographical errors, or address conflicts caused by the assignment of an IP address to more than one computer at the same time.
  • Reduced network administration. DHCP includes the following features to reduce network administration:
    • Centralized and automated TCP/IP configuration.
    • The ability to define TCP/IP configurations from a central location.
    • The ability to assign a full range of additional TCP/IP configuration values by means of DHCP options.
    • The efficient handling of IP address changes for clients that must be updated frequently, such as those for portable computers that move to different locations on a wireless network.
    • The forwarding of initial DHCP messages by using a DHCP relay agent, thus eliminating the need to have a DHCP server on every subnet.


DHCP step-by-step configuration.


I assume that you have a Computer with Windows 2008 server operating system.The computer must be connected in a network.If it is ok,


Logon as administrator. 
Go to server manager.right click
Select DHCP Server Role.
Click Next
Select the network connection through which you have to provide IP address to clients.
Click validate option.
Simply select Next 

Add a scope.Enter the starting and ending IP address.
Click Next.
Select disable IPV6 option.

The default option is enough.Click Next.
Click install. It will take a little time to finish.
See the above image. The installation was successful.

Ok. Now our server is working.

Go to another computer and select the option "Obtain an IP address automatically". Now you have got one IP addrees automatically from the server. 



        Contact us for more details;


Zion Computer Hardware and Networking Institute.
Zion House, 3rd Floor, Kollannur Plaza, Jos Junction
M.G Road- Ernakulam, Kochi- 682 016
email- ho@zionitedu.com, www.zionitedu.com.





If you want to know updated events happens in the field of information technology, go to our facebook group. zionkerala










Thursday, 10 May 2012

Creating Email Groups in Microsoft Outlook 2007


Microsoft Outlook has the ability to create group.This group is named as distribution list.Now we discuss how to create a distribution list.


Creating our own Groups



Click the Contacts button in the left navigation bar on your screen:




Now, you should be in the Contacts view. Choose Actions then New Distribution List (or press Ctrl+Shift+L)





In this window add the name of the group and group members. Select Members from the Members group on the Ribbon.




after giving the name save the group.

Ok. now you have successfully created your group. For the testing purpose create a test mail and type the name of the group in "To" option. See the picture below, here the group name is "systems".You can surely send a mail to multiple users in your group.



Remember the maximum number of recipients for a mail in Outlook is limited to 100. This number is for Gmail, it will be different in other service providers, such as Yahoo, hotmail ,......etc











Monday, 7 May 2012

Chat face to face with family and friends.


Now we don't want to have a software for voice or video chatting. Use Gmail account to do so.




Advantage.
1). It is free and can use from any operating system.
2). Video chat directly from Gmail, iGoogle and Orkut.
3). Look and sound your best with high-quality audio and video.


What you need to do?

step1: Install the Voice and Video Chat

                                                click here to download Voice and Video Chat.


step2: Sign in to Gmail, Google+, iGoogle, orkut, or your Chrome OS device.

step3: 

for Voice Calls

If your contact has a camera icon next to their name in your Chat list, you can start a voice call with them. Simply select your contact from the chat list and in the Chat window that appears click the phone icon.

for Hangouts and 1:1 video chat

Google+ users who are using Chat in iGoogle, orkut, Chrome OS, or Google+ can now start Hangouts directly from their Chat window. If you’re using Chat in Gmail you can still start a 1:1 video chat from within your Chat window.



                                                                     Best Wishes.