Friday 25 July 2014

Put Pixel CPP

#include<conio.h>
#include<stdlib.h>
#include<math.h>
#include<dos.h>
#include<graphics.h>
void main()
{

 int d=DETECT,m;
 initgraph(&d,&m,"c:\\tc\\bgi");
for(int x=1,y=10;x<=10000;x++)
{
 putpixel(x,y,6);
}
getch();
closegraph();
}

Monday 21 July 2014

A-Z Index of the Bash command line for Linux.


An A-Z Index of the Bash command line for Linux.

  alias
   Create an alias •
  apropos
 Search Help manual pages (man -k)
  apt-get
 Search for and install software packages (Debian/Ubuntu)
  aptitude
Search for and install software packages (Debian/Ubuntu)
  aspell
  Spell Checker
  awk
     Find and Replace text, database sort/validate/index
b
  basename
Strip directory and suffix from filenames
  bash
    GNU Bourne-Again SHell 
  bc
      Arbitrary precision calculator language 
  bg
      Send to background
  break
   Exit from a loop •
  builtin
 Run a shell builtin
  bzip2
   Compress or decompress named file(s)
c
  cal
     Display a calendar
  case
    Conditionally perform a command
  cat
     Concatenate and print (display) the content of files
  cd
      Change Directory
  cfdisk
  Partition table manipulator for Linux
  chgrp
   Change group ownership
  chmod
   Change access permissions
  chown
   Change file owner and group
  chroot
  Run a command with a different root directory
  chkconfig
System services (runlevel)
  cksum
   Print CRC checksum and byte counts
  clear
   Clear terminal screen
  cmp
     Compare two files
  comm
    Compare two sorted files line by line
  command
 Run a command - ignoring shell functions •
  continue
Resume the next iteration of a loop •
  cp
      Copy one or more files to another location
  cron
    Daemon to execute scheduled commands
  crontab
 Schedule a command to run at a later time
  csplit
  Split a file into context-determined pieces
  cut
     Divide a file into several parts
d
  date
    Display or change the date & time
  dc
      Desk Calculator
  dd
      Convert and copy a file, write disk headers, boot records
  ddrescue
Data recovery tool
  declare
 Declare variables and give them attributes •
  df
      Display free disk space
  diff
    Display the differences between two files
  diff3
   Show differences among three files
  dig
     DNS lookup
  dir
     Briefly list directory contents
  dircolors
Colour setup for `ls'
  dirname
 Convert a full pathname to just a path
  dirs
    Display list of remembered directories
  dmesg
   Print kernel & driver messages 
  du
      Estimate file space usage
e
  echo
    Display message on screen •
  egrep
   Search file(s) for lines that match an extended expression
  eject
   Eject removable media
  enable
  Enable and disable builtin shell commands •
  env
     Environment variables
  ethtool
 Ethernet card settings
  eval
    Evaluate several commands/arguments
  exec
    Execute a command
  exit
    Exit the shell
  expect
  Automate arbitrary applications accessed over a terminal
  expand
  Convert tabs to spaces
  export
  Set an environment variable
  expr
    Evaluate expressions
f
  false
   Do nothing, unsuccessfully
  fdformat
Low-level format a floppy disk
  fdisk
   Partition table manipulator for Linux
  fg
      Send job to foreground 
  fgrep
   Search file(s) for lines that match a fixed string
  file
    Determine file type
  find
    Search for files that meet a desired criteria
  fmt
     Reformat paragraph text
  fold
    Wrap text to fit a specified width.
  for
     Expand words,
and execute commands
  format
  Format disks or tapes
  free
    Display memory usage
  fsck
    File system consistency check and repair
  ftp
     File Transfer Protocol
  function
Define Function Macros
  fuser
   Identify/kill the process that is accessing a file
g
  gawk
    Find and Replace text within file(s)
  getopts
 Parse positional parameters
  grep
    Search file(s) for lines that match a given pattern
  groupadd
Add a user security group
  groupdel
Delete a group
  groupmod
Modify a group
  groups
  Print group names a user is in
  gzip
    Compress or decompress named file(s)
h
  hash
    Remember the full pathname of a name argument
  head
    Output the first part of file(s)
  help
    Display help for a built-in command •
  history
 Command History
  hostname
Print or set system name
i
  iconv
   Convert the character set of a file
  id
      Print user and group id's
  if
      Conditionally perform a command
  ifconfig
Configure a network interface
  ifdown
  Stop a network interface 
  ifup
    Start a network interface up
  import
  Capture an X server screen and save the image to file
  install
 Copy files and set attributes
j
  jobs
    List active jobs •
  join
    Join lines on a common field
k
  kill
    Stop a process from running
  killall
 Kill processes by name
l
  less
    Display output one screen at a time
  let
     Perform arithmetic on shell variables •
  link
    Create a link to a file 
  ln
      Create a symbolic link to a file
  local
   Create variables •
  locate
  Find files
  logname
 Print current login name
  logout
  Exit a login shell •
  look
    Display lines beginning with a given string
  lpc
     Line printer control program
  lpr
     Off line print
  lprint
  Print a file
  lprintd
 Abort a print job
  lprintq
 List the print queue
  lprm
    Remove jobs from the print queue
  ls
      List information about file(s)
  lsof
    List open files
m
  make
    Recompile a group of programs
  man
     Help manual
  mkdir
   Create new folder(s)
  mkfifo
  Make FIFOs (named pipes)
  mkisofs
 Create an hybrid ISO9660/JOLIET/HFS filesystem
  mknod
   Make block or character special files
  more
    Display output one screen at a time
  mount
   Mount a file system
  mtools
  Manipulate MS-DOS files
  mtr
     Network diagnostics (traceroute/ping)
  mv
      Move or rename files or directories
  mmv
     Mass Move and rename (files)
n
  netstat
 Networking information
  nice
    Set the priority of a command or job
  nl
      Number lines and write files
  nohup
   Run a command immune to hangups
  notify-send
 Send desktop notifications
  nslookup
Query Internet name servers interactively
o
  open
    Open a file in its default application
  op
      Operator access 
p
  passwd
  Modify a user password
  paste
   Merge lines of files
  pathchk
 Check file name portability
  ping
    Test a network connection
  pkill
   Stop processes from running
  popd
    Restore the previous value of the current directory
  pr
      Prepare files for printing
  printcap
Printer capability database
  printenv
Print environment variables
  printf
  Format and print data •
  ps
      Process status
  pushd
   Save and then change the current directory
  pv
      Monitor the progress of data through a pipe 
  pwd
     Print Working Directory
q
  quota
   Display disk usage and limits
  quotacheck
Scan a file system for disk usage
  quotactl
Set disk quotas
r
  ram
     ram disk device
  rcp
     Copy files between two machines
  read
    Read a line from standard input •
  readarray
Read from stdin into an array variable •
  readonly
Mark variables/functions as readonly
  reboot
  Reboot the system
  rename
  Rename files
  renice
  Alter priority of running processes 
  remsync
 Synchronize remote files via email
  return
  Exit a shell function
  rev
     Reverse lines of a file
  rm
      Remove files
  rmdir
   Remove folder(s)
  rsync
   Remote file copy (Synchronize file trees)
s
  screen
  Multiplex terminal, run remote shells via ssh
  scp
     Secure copy (remote file copy)
  sdiff
   Merge two files interactively
  sed
     Stream Editor
  select
  Accept keyboard input
  seq
     Print numeric sequences
  set
     Manipulate shell variables and functions
  sftp
    Secure File Transfer Program
  shift
   Shift positional parameters
  shopt
   Shell Options
  shutdown
Shutdown or restart linux
  sleep
   Delay for a specified time
  slocate
 Find files
  sort
    Sort text files
  source
  Run commands from a file '.'
  split
   Split a file into fixed-size pieces
  ssh
     Secure Shell client (remote login program)
  strace
  Trace system calls and signals
  su
      Substitute user identity
  sudo
    Execute a command as another user
  sum
     Print a checksum for a file
  suspend
 Suspend execution of this shell •
  sync
    Synchronize data on disk with memory
t
  tail
    Output the last part of file
  tar
     Store, list or extract files in an archive
  tee
     Redirect output to multiple files
  test
    Evaluate a conditional expression
  time
    Measure Program running time
  timeout
 Run a command with a time limit
  times
   User and system times
  touch
   Change file timestamps
  top
     List processes running on the system
  traceroute
Trace Route to Host
  trap
    Run a command when a signal is set(bourne)
  tr
      Translate, squeeze, and/or delete characters
  true
    Do nothing, successfully
  tsort
   Topological sort
  tty
     Print filename of terminal on stdin
  type
    Describe a command •
u
  ulimit
  Limit user resources •
  umask
   Users file creation mask
  umount
  Unmount a device
  unalias
 Remove an alias •
  uname
   Print system information
  unexpand
Convert spaces to tabs
  uniq
    Uniquify files
  units
   Convert units from one scale to another
  unset
   Remove variable or function names
  unshar
  Unpack shell archive scripts
  until
   Execute commands (until error)
  uptime
  Show uptime
  useradd
 Create new user account
  userdel
 Delete a user account
  usermod
 Modify user account
  users
   List users currently logged in
  uuencode
Encode a binary file 
  uudecode
Decode a file created by uuencode
v
  v
       Verbosely list directory contents (`ls -l -b')
  vdir
    Verbosely list directory contents (`ls -l -b')
  vi
      Text Editor
  vmstat
  Report virtual memory statistics
w
  wait
    Wait for a process to complete •
  watch
   Execute/display a program periodically
  wc
      Print byte, word, and line counts
  whereis
 Search the user's $path, man pages and source files for a program
  which
   Search the user's $path for a program file
  while
   Execute commands
  who
     Print all usernames currently logged in
  whoami
  Print the current user id and name (`id -un')
  wget
    Retrieve web pages or files via HTTP, HTTPS or FTP
  write
   Send a message to another user 
x
  xargs
   Execute utility, passing constructed argument list(s)
  xdg-open
Open a file or URL in the user's preferred application.
  yes
     Print a string until interrupted
  zip
     Package and compress (archive) files.
  .
       Run a command script in the current shell
  !!
      Run the last command again
  ###     Comment / Remark

OST Assignment 1

1. Compare Open source software and Paid License Software .

Ans1. Open source is developed by people who have access to the source code. In fact users who know how can read it and develop either plugins or patches which solve problems the original might have, and in fact it could be incorporated into later versions of the original. 1. License software is often written by people with only limited access to the code they will run on. Microsoft especially protects its source code from many people who develop for their os. This leads to inherent inefficiencies as people who do License code are often forced by commercial interests to reinvent the wheel. 

2. Open Source code is usually developed to be USEFUL. The projects which succeed address real needs and garbage like Vista's Aero which requires so much computing power was clearly inspired by Linux's Compiz/Fusion which runs on old Dells. I am not a fan of Compiz/Fusion but its success in the Linux community went far beyond what people think of as the Linux community if they are not a part of it. 2. License software is generally designed from the perspective of what will appeal to consumers. Thus loved programs will be discontinued while programs which serve no useful purpose (WGA) will be pushed heavily. 

3. Open source is not always free but it usually is available free -- not as a trial -- in one form or another because the code will be released that way. License software costs more and usually has a shorter support schedule.

--------------------------------------------------------------------------------

2. Software development mode.
AnsThe development models are the various processes or methodologies that are being selected for the development of the project depending on the project’s aims and goals. There are many development life cycle models that have been developed in order to achieve different required objectives. The models specify the various stages of the process and the order in which they are carried out.
The selection of model has very high impact on the testing that is carried out. It will define the what, where and when of our planned testing, influence regression testing and largely determines which test techniques to use.
There are various Software development models or methodologies. They are as follows:
  1. Waterfall model
  2. V model
  3. Incremental model
  4. RAD model
  5. Agile model
  6. Iterative model
  7. Spiral model
Choosing right model for developing of the software product or application is very important. Based on the model the development and testing processes are carried out.
Different companies based on the software application or product, they select the type of development model whichever suits to their application. But these days in market the ‘Agile Methodology’ is the most used model. ‘Waterfall Model’ is the very old model. In ‘Waterfall Model’ testing starts only after the development is completed. Because of which there are many defects and failures which are reported at the end. So,the cost of fixing these issues are high. Hence, these days people are preferring ‘Agile Model’. In ‘Agile Model’ after every sprint there is a demo-able feature to the customer. Hence customer can see the features whether they are satisfying their need or not.
‘V-model’ is also used by many of the companies in their product. ‘V-model’ is nothing but ‘Verification’ and ‘Validation’ model. In ‘V-model’ the developer’s life cycle and tester’s life cycle are mapped to each other. In this model testing is done side by side of the development.
Likewise ‘Incremental model’, ‘RAD model’, ‘Iterative model’ and ‘Spiral model’ are also used based on the requirement of the customer and need of the product.
--------------------------------------------------------------------------------

3. Describe 5 linux distributors
Ans
1: Mint Linux:
 Linux Mint is a 32- and 64-bit Linux distribution for desktop computers, based on either Ubuntu or Debian. Its stated aim is to be a "modern, elegant and comfortable operating system which is both powerful and easy to use." Mint provides full out-of-the-box multimedia support by including some proprietary software such as Adobe Flash. Mint's motto is "from freedom came elegance".


2: Mageia: 
Mageia is a Linux computer operating system, distributed as free and open source software. It is forked from the Mandriva Linux distribution.

The first release of the software distribution, Mageia 1, took place in June 2011

3: Ubuntu: 
Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment (GNOME was the previous desktop environment). It is based on free software and named after the Southern African philosophy of ubuntu (literally, "human-ness"), which often is translated as "humanity towards others" or "the belief in a universal bond of sharing that connects all humanity

4: Fedora:

Fedora  is an operating system based on the Linux kernel, developed by the community-supported Fedora Project and owned by Red Hat. Fedora contains software distributed under a free and open source license and aims to be on the leading edge of such technologies


Linus Torvalds, author of the Linux kernel, uses Fedora on all his computers.

5: Debian:
Debian is an operating system composed of free software mostly carrying the GNU General Public License, and developed by an Internet collaboration of volunteers aligned with the Debian Project. It is one of the most popular Linux distributions for personal computers and network servers, and has been used as a base for other Linux distributions.

--------------------------------------------------------------------------------

4. Why Linux Is More Secure Than Windows?
Ans
1. Privileges

Linux systems are by no means infallible, but one of their key advantages lies in the way account privileges are assigned. In Windows, users are generally given administrator access by default, which means they pretty much have access to everything on the system, even its most crucial parts. So, then, do viruses. It's like giving terrorists high-level government positions.

With Linux, on the other hand, users do not usually have such "root" privileges; rather, they're typically given lower-level accounts. What that means is that even if a Linux system is compromised, the virus won't have the root access it would need to do damage systemwide; more likely, just the user's local files and programs would be affected. That can make the difference between a minor annoyance and a major catastrophe in any business setting.

2. Social Engineering

Viruses and worms often spread by convincing computer users to do something they shouldn't, like open attachments that carry viruses and worms. This is called social engineering, and it's all too easy on Windows systems. Just send out an e-mail with a malicious attachment and a subject line like, "Check out these adorable puppies!"--or the porn equivalent--and some proportion of users is bound to click without thinking. The result? An open door for the attached malware, with potentially disastrous consequences organizationwide.

Thanks to the fact that most Linux users don't have root access, however, it's much harder to accomplish any real damage on a Linux system by getting them to do something foolish. Before any real damage could occur, a Linux user would have to read the e-mail, save the attachment, give it executable permissions and then run the executable. Not very likely, in other words.

3. The Monoculture Effect

However you want to argue the exact numbers, there's no doubt that Microsoft Windows still dominates most of the computing world. In the realm of e-mail, so too do Outlook and Outlook Express. And therein lies a problem: It's essentially a monoculture, which is no better in technology than it is in the natural world. Just as genetic diversity is a good thing in the natural world because it minimizes the deleterious effects of a deadly virus, so a diversity of computing environments helps protect users.

Fortunately, a diversity of environments is yet another benefit that Linux offers. There's Ubuntu, there's Debian, there's Gentoo, and there are many other distributions. There are also many shells, many packaging systems, and many mail clients; Linux even runs on many architectures beyond just Intel. So, whereas a virus can be targeted squarely at Windows users, since they all use pretty much the same technology, reaching more than a small faction of Linux users is much more difficult. Who wouldn't want to give their company that extra layer of assurance?

4. Audience Size

Hand-in-hand with this monoculture effect comes the not particularly surprising fact that the majority of viruses target Windows, and the desktops in your organization are no exception. Millions of people all using the same software make an attractive target for malicious attacks.

5. How Many Eyeballs

"Linus' Law"--named for Linus Torvalds, the creator of Linux--holds that, "given enough eyeballs, all bugs are shallow." What that means is that the larger the group of developers and testers working on a set of code, the more likely any flaws will be caught and fixed quickly. This, in other words, is essentially the polar opposite of the "security through obscurity" argument.

With Windows, it's a limited set of paid developers who are trying to find problems in the code. They adhere to their own set timetables, and they don't generally tell anyone about the problems until they've already created a solution, leaving the door open to exploits until that happens. Not a very comforting thought for the businesses that depend on that technology.

In the Linux world, on the other hand, countless users can see the code at any time, making it more likely that someone will find a flaw sooner rather than later. Not only that, but users can even fix problems themselves. Microsoft may tout its large team of paid developers, but it's unlikely that team can compare with a global base of Linux user-developers around the globe. Security can only benefit through all those extra "eyeballs."

Once again, none of this is to say that Linux is impervious; no operating system is. And there are definitely steps Linux users should take to make their systems as secure as possible, such as enabling a firewall, minimizing the use of root privileges, and keeping the system up to date. For extra peace of mind there are also virus scanners available for Linux, including ClamAV. These are particularly good measures for small businesses, which likely have more at stake than individual users do.

It's also worth noting that security firm Secunia recently declared that Apple products have more security vulnerabilities than any others--including Microsoft's.


Either way, however, when it comes to security, there's no doubt that Linux users have a lot less to worry about.