+ All Categories
Home > Documents > UNIX DAY 1

UNIX DAY 1

Date post: 31-May-2018
Category:
Upload: kunal
View: 221 times
Download: 0 times
Share this document with a friend

of 18

Transcript
  • 8/14/2019 UNIX DAY 1

    1/18

    Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    UNIX Part - I

    ObjectivesUnix History

    Why Unix ?

    Unix Features

    Unix Structure

    Unix Vs Windows

    Unix File system

    Unix Basic Commands

    Permissions - chmod

    Questions

    By:- Kunal Chhajed

  • 8/14/2019 UNIX DAY 1

    2/18

    Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    UNIX History

    In 1960s - Multics(Multiplexed Information and Computing

    Service

    In 1970s - the project was named Unics

    In 1973, Unix was rewritten in the C programming language

    AT&T made Unix available to universities and commercial firms

    http://en.wikipedia.org/wiki/Multicshttp://en.wikipedia.org/wiki/C_%28programming_language%29http://en.wikipedia.org/wiki/C_%28programming_language%29http://en.wikipedia.org/wiki/Multics
  • 8/14/2019 UNIX DAY 1

    3/18

    Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Why Use UNIX

    Multi-user- Support more than one user session, simultaneously,

    on the same system, at a time.

    Multiprogramming - Support more than one program, in memory, ata time.

    Multitasking - A single process can initiate multiple threads of

    execution. Exploiting concurrency in a process.

    Supports virtual memory, programs larger than the physical RAM of

    the system, can be executed.

  • 8/14/2019 UNIX DAY 1

    4/18

    Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Unix features continued ...

    Supports hierarchical file system to hold user data

    organized in the form of directories and files.

    Identifies a user with a userid and groupid and allows

    access permissions to resources to be specified usingthese ids.

    Supports a large number of tools, libraries and utilities to

    aid software development

  • 8/14/2019 UNIX DAY 1

    5/18

  • 8/14/2019 UNIX DAY 1

    6/18

    Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Unix Vs Windows

    Unix is more flexible and can be installed on many different types of

    machines.

    - Unix is more stable and does not go down as often as Windows

    does, therefore requires less administration and maintenance.

    - Unix has greater built-in security and permissions features thanWindows.

    - Unix possesses much greater processing power than Windows.

    - Unix is the leader in serving the Web. About 90% of the Internet

    relies on Unix operating systems running Apache, the world's most

    widely used Web server.- Software upgrades from Microsoft often require the user to

    purchase new or more hardware or prerequisite software. That is not

    the case with Unix.

    - The mostly free or inexpensive open-source operating systems

  • 8/14/2019 UNIX DAY 1

    7/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Unix File system

  • 8/14/2019 UNIX DAY 1

    8/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Typing UNIX Commands

    ls get directory listing

    ls l to view the permissions

    ls F tells which are directory

    ls a displays hidden files alsomkdir make directory

    cd change directory

    rm remove file

    rmdir remove directory

    more displays content of file

    date - displays current date

    cal - displays calendar

  • 8/14/2019 UNIX DAY 1

    9/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Continued

    echo string Echos arguments to the standardoutput

    cp copy a file

    mv move a file

    wc [filename] count number bytes,words,lines inthe file

    pwd prints the full path name of the current

    directory

    kill [PIDs] Terminate one or more process IDsdf shows space available on the system

    du shows up space used by folders

  • 8/14/2019 UNIX DAY 1

    10/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Continued

    join file1 file2

    cmp file1 file2

    bc simple mathematical calculations

    chsh change your login shellclear clear the terminal

  • 8/14/2019 UNIX DAY 1

    11/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Continued

    info [options] Documentation reader for

    commands

    Unix allows grouping of commands

    e.g pwd;date;cal

    passwd create or change the password withassociated user-name

    touch [filename] create an empty file

  • 8/14/2019 UNIX DAY 1

    12/18

  • 8/14/2019 UNIX DAY 1

    13/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Permissions

    chmod changes the permission of the file

    Syntax:-

    chmod [mode] filename

    Permissions

    u - User who owns the file.

    g- Group that owns the file.

    o - Other. r- Read the file.

    w- Write or edit the file.

    x- Execute or run the file as a program

  • 8/14/2019 UNIX DAY 1

    14/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Continued

    Numeric Permissions:

    chmod can also to attributed by using Numeric Permissions:

    400 read by owner

    040 read by group

    004 read by anybody (other)

    200 write by owner

    020 write by group

    002 write by anybody

    100 execute by owner

    010 execute by group

    001 execute by anybody

  • 8/14/2019 UNIX DAY 1

    15/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Continued

    for example, a common HTML file on a

    Unix server to be only viewed over the Internet would

    be:chmod 644 file.html

    Files such as scripts that need to be executed need

    more permissions. So common permission given toscripts.

    chmod 755 file.cgi

  • 8/14/2019 UNIX DAY 1

    16/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    UNIX BookA Students Guide to UNIX, Harley Hahn,McGraw-Hill, 1993.

    A Practical Guide to the UNIX System,Mark G. Sobell, Benjamin-Cummings,3rd Edition, 1995.

    An Introduction to Berkeley UNIX,Paul Wang, Wadsworth, 1992.

  • 8/14/2019 UNIX DAY 1

    17/18 Copyright 2002 - 2006 HSBC Software Development India Pvt. Ltd. All rights reserved.

    Thanks!!!

  • 8/14/2019 UNIX DAY 1

    18/18

    END


Recommended