Friday, October 12, 2012

Filter in Linux

If a Linux command accepts its input from the standard input and produces its output on standard output is know as a filter. A filter performs some kind of process on the input and gives output. For e.g.. Suppose you have file called 'hotel.txt' with 100 lines data, And from 'hotel.txt' you would like to print contains from line number 20 to line number 30 and store this result to file called 'hlist' then give command:
$ tail +20 < hotel.txt | head -n30 >hlist
Here head command is filter which takes its input from tail command (tail command start selecting from line number 20 of given file i.e. hotel.txt) and passes this lines as input to head, whose output is redirected to 'hlist' file.
Consider one more following example
$ sort < sname | uniq > u_sname
Here uniq is filter which takes its input from sort command and passes this lines as input to uniq; Then uniqs output is redirected to "u_sname" file.

Pipes in Linux

A pipe is a way to connect the output of one program to the input of another program without any temporary file.
Pipe Defined as:
"A pipe is nothing but a temporary storage place where the output of one command is stored and then passed as the input for second command. Pipes are used to run more than two commands ( Multiple commands) from same command line."
Syntax:
command1 | command2
Examles: 
Command using PipesMeaning or Use of Pipes
$ ls | moreOutput of ls command is given as input to more command So that output is printed one screen full page at a time.
$ who | sort Output of who command is given as input to sort command So that it will print sorted list of users
$ who | sort > user_listSame as above except output of sort is send to (redirected) user_list file
$ who | wc -l Output of who command is given as input to wc command So that it will number of user who logon to system
$ ls -l | wc  -l   Output of ls command is given as input to wc command So that it will print number of files in current directory.
$ who | grep pratikOutput of who command is given as input to grep command So that it will print if particular user name if he is logon or nothing is printed (To see particular user is logon or not)

How to write your first Shell Script in linux?


Following steps are required to write shell script:
(1) Use any editor like vi or mcedit to write shell script.
(2) After writing shell script set execute permission for your script as follows
syntax: 
chmod permission your-script-name
Examples:
$ chmod +x your-script-name
$ chmod 755 your-script-name
Note: This will set read write execute(7) permission for owner, for group and other permission is read and execute only(5).
(3) Execute your script as
syntax: 
bash your-script-name
sh your-script-name
./your-script-name
Examples:
$ bash bar
$ sh bar
$ ./bar
NOTE In the last syntax ./ means current directory, But only . (dot) means execute given command file in current shell without starting the new copy of shell, The syntax for . (dot) command is as follows
Syntax:
. command-name
Example:
$ . foo
Now you are ready to write first shell script that will print "Knowledge is Power" on screen.
$ vi first
#
# My first shell script
#
clear
echo "Knowledge is Power"
After saving the above script, you can run the script as follows:
$ ./first
This will not run script since we have not set execute permission for our script first; to do this type command
$ chmod 755 first
$ ./first
First screen will be clear, then Knowledge is Power is printed on screen.
Script Command(s)
Meaning
$ vi firstStart vi editor
#
# My first shell script
#
# followed by any text is considered as comment. Comment gives more information about script, logical explanation about shell script.
Syntax:
# comment-text
clearclear the screen
echo "Knowledge is Power"To print message or value of variables on screen, we use echo command, general form of echo command is as follows
syntax: 
echo "Message"
Tip: For shell script file try to give file extension such as .sh, which can be easily identified by you as shell script.

Download Linux. Which linux and where?


When Linus Torvalds first developed Linux back in August of 1991, the operating system basically consisted of his kernel and some GNU tools. With the help of others Linus added more and more tools and applications.
With time, individuals, university students and companies began distributing Linux with their own choice of packages bound around Linus' kernel. This is where the concept of the "distribution" was born.
Today, creating and selling Linux distributions is a multi-million dollar business. You can buy a boxed version of Linux from companies such as Red Hat, SuSE, MandrakeSoft and others. You can also download Linux from any number of companies and individuals. There are distributions of all types and for practically any kind of computing endeavor.
For a complete list of various linux distributions and a comparison check this wiki artilce. You can follow the links there to download your favourite linux. My favourite is Cent OS.

How to use Linux?

You can use Linux as Server Os or as stand alone Os on your PC. (But it is best suited for Server.) As a server Os it provides different services/network resources to client. Server Os must be:

  • Stable
  • Robust
  • Secure
  • High Performance
Linux offers all of the above characteristics plus its Open Source and Free OS. So Linux can be used as:
(1) On stand alone workstation/PC for word processing, graphics, software development, internet, e-mail, chatting, small personal database management system etc.
(2) In network environment as:
(A) File and Print or Application Server
Share the data, Connect the expensive device like printer and share it, e-mail within the LAN/intranet etc are some of the application.
(B) Linux sever cab be connected to Internet, So that PC's on intranet can share the internet/e-mail etc. You can put your web sever that run your web site or transmit the information on the internet.
So you can use Linux for:
  • Personal Work
  • Web Server
  • Software Development Workstation
  • Workgroup Server
  • In Data Center for various server activities such as FTP, Telnet, SSH, Web, Mail, Proxy, Proxy Cache Appliance etc

Thursday, August 16, 2012

Windows 8 RTM Now Available for MSDN and TechNet Subscribers




The bits are available now!

The RTM build string is 6.2.9200.16384 (win8_rtm.120725-1247). For more information on Windows 8 Availability, please see this blog post.

From today onwards, people with MSDN or TechNet subscription can go to Subscriber Downloads section to download the various original Windows 8 RTM DVD ISO images.

The genuine activation product keys to activate Windows 8 RTM can also be generated, although the free Release Preview of Windows 8 is still available and usable for general public.
But if it is not enough! and you want to try out RTM bits. There is a “Evaluation” version that provides a 90-day trial of Windows 8 Enterprise edition. 


Things to Know Before You Start
  • The evaluation edition will expire and cannot be upgraded.
  • To upgrade, the evaluation must be uninstalled and a non-evaluation version of Windows must be re-installed from your original installation media.
  • Consider running the evaluation edition in a virtual environment or installing on a separate hard drive or partition. The will allow you to upgrade your original Windows installation to Windows 8.
  • During registration (required) you must login with a Microsoft account and provide your name, e-mail address and country.
  • You are required to activate the product online within 10 days after installing.
  • Once the evaluation is installed, you cannot upgrade. To revert to a previous version of Windows, you must do a clean install from your original installation media.


Activation and Usage Guidelines
  • Back up your files and settings before installing this evaluation and again prior to the 90-day expiration.
  • Upon installation, you will have 10 days to activate this evaluation online. Windows will prompt you to activate. A product key is not required for this software.
  • You must complete activation before August 15, 2013, to use this evaluation.
  • Once you activate, you have up to 90 days to use the software. You can track the amount of time you have left by referring to the “watermark” in the lower right corner of the Windows desktop.
  • If you fail to activate this evaluation within the 10-day grace period, or if your evaluation period expires, the desktop background will turn black, you will see a persistent desktop notification indicating that the system is not genuine, and the PC will shut down every hour losing unsaved work.
  • Following the evaluation period, you will need to replace the operating system on your test computer and reinstall all your programs and data. It is not possible to upgrade the evaluation to a licensed working version of Windows 8. A clean installation is required.

Windows 8 Enterprise [32bit]
Windows 8 Enterprise [64bit]

Saturday, July 14, 2012

Mozilla's Firefox OS(Boot to Gecko) (New Mobile OS)

What is Firefox OS?
  • Firefox OS is a Mobile OS, original name is Boot to Gecko.
  • Boot to Gecko is a mobile platform which is now become Firefox OS
  • This operating system will use Firefox brand, and it will be power of smart phones built entirely open web standards, it will be based on HTML 5 application.

First mobile launch for Firefox OS?
  • A very first device with Firefox OS feature will be manufactured and launched by
  • ZTE and TCL Communication Technology (Alcatel) using Snapdragon™ processors from Qualcomm Incorporated, the leader in smart phone platforms
android ide (AIDE)
Mozilla's Firefox OS boot to gecko launch date features

How it will be better then other mobile platform
  • Full Google map display like your desktop
  • Two social networking will be deeply integrated in Firefox OS.
  •  Simple and faster will work on device which runs on 600MHz
  •  Better then Android as per Telefonica Chief Executive, Matthew
  •  Cost Cheaper than other i.e.  iPhone and Android