Tutorials Hut

Tutorials Hut

  • Unix For Testers

       Introduction to Unix
       Unix System Architecture
       Unix File System Structure
       Absolute and Relative Path
       Basic Unix Commands
       cal command in Unix
       who command in Unix
       date command in Unix
       clear command in Unix
       more command in Unix
       whoami command in Unix
       uname command in Unix
       man command in Unix
       echo command in Unix
       Unix File System Commands
       ls command in Unix
       cat command in Unix
       cp command in Unix
       mv command in Unix
       pwd command in Unix
       cd command in Unix
       mkdir command in Unix
       rmdir command in Unix
       rm command in Unix
       touch command in Unix
       dirname command in Unix
       tar command in Unix
       Unix Links(ln)
       Hard Link
       Soft Link
       Regular Expressions
        Basic Regular Expressions
       Interval Regular Expressions
       Pipes and Filters
       Unix Text Processing Commands
       cmp command in Unix
       diff command in Unix
       comm command in Unix
       cut command in Unix
       Paste command in Unix
       head command in Unix
       tail command in Unix
       wc command in Unix
       sort command in Unix
       grep command in Unix
       Process Related Command
       top command in Unix
       ps command in Unix
       nice command in Unix
       Kill command in Unix
       nohup command in Unix
       time command in Unix
       File Tranfer Commands in Unix
       file transfer using scp command
       file transfer using rlogin command
       file transfer using telnet command
       ssh(Secure Shell) command in Unix
       ftp file transfer command
       sftp file transfer command
       chmod command in Unix
       File Permission and File Security in Unix



  • Unix System Architecture and Unix File System Structure

    The architecture of this operating system is four layered. Unix system architecture consists of Hardware, Kernel, System Call interface(shell) commands and utilities, user applications etc. In Unix, all files are organized into directories. Files in Unix System are organized into multi-level hierarchy structure known as a directory tree.

    We will learn below topics in this article:

    Unix System Architecture

    A computer system contains hardware and software that controls and manage computer hardware, software resources, and Operating system required for the computer. The operating system acts as the intermediate between hardware and the user-defined application software. Unix is a multitasking, multiuser operating system.

    The software is of two types:

        • System software
        • Application software.

    The system software provides platform for other software on the computer.Application Software is user-defined software that works on the system software. An operating system is a system software.

    The  Unix system architecture is divided by into four layers.

    Major components of Unix System architecture are :

        • Kernel
        • Shell
        • Commands and Utilities
        • User Applications
    Unix architecture

    Unix Kernel

     Kernel is the central core that interacts directly with the hardware of the system.

    The main functions of Kernel are:

        • Computer hardware such as memory, disc, printers are controlled by the kernel.
        • The kernel schedules the processes, control and executes various user-defined tasks.
        • Manages the data storage

    Unix Shell

    It is the interface between the user and the kernel. Users can interact with the shell using shell commands.

        • Users communicate directly with Shell.Translates user’s commands into functions understandable by Kernel
        • It interprets commands given by the users and executes them using the kernel.
        • Issues a shell prompt and waits for user response
        • Provides programming ability to the users to write shell commands .

    Commands and Utilities

    Commands used by the Unix operating system are:

        •  ‘sh’ – shell commands providing a primary user interface,
        • There are various commands and utilities which you can make use of in your day to day activities. cp, mv, cat and grep

    User Applications

    All the data/programs which the user writes.

     

    Unix File System Structure

    Files in Unix System are organized into multi-level hierarchy structure known as a directory tree. At the top of the file system is a directory called “root” which is represented by a “/”

    Unix File Structure
    • A file is a smallest unit in which the information is stored. 
    • All data in Unix is organized into files. All files are organized into directories. Unix has multiple file systems
    • A file system is a formatted partition of the disk ,group of files having relevant information 
    • There is always one compulsory file system known as the root.
    • For more information

    Features of the Unix file management system :

    • It implements a hierarchical directory structure of the file name space.
    • It implements a uniform and consistent treatment of file data and other I/O objects.
    • It implements a means of sharing file data.
    • It implements a means of protecting file data.
    • Keeps track of files using i-node numbers.
    • File access permissions can be set 3 classes of users: 
    1. File Owner  
    2. File Owner’s Group
    3. Others

    Absolute and Relative Path

    What is a Path?

    A path is a unique location to a file or a folder in a file system of an OS. A path to a file is a combination of / and alpha-numeric characters.

    What Is An Absolute Path?

    An absolute path is defined as specifying the location of a file or directory from the root directory(/). In other words absolute path is a complete path from start of the actual file system from / directory.
    Some examples of absolute path: 
    /home/base/myData/test.config /home/base/myData/queries.sql

    What Is The Relative Path?

     Relative path is defined as a path related to the present working directory(pwd).  Suppose I am located in /home/base and I want to change directory to /home/base/myData. I can use relative path concept to change directory to myData Changing directory using relative path:
    Syntax:
    $pwd /home/base $cd myData

     Change directory using absolute path:

     $cd /home/base/myData Note: We can use absolute path from any location where as if you want to use relative path we should be present in a directory where we are going to specify relative to that present working directory.
    CommandDescriptionPath
    cd ./myDataChange current directory to myDataUse relative path
    cd ..Change current directory to parent directoryUse relative path
    cd /home/base/myDataChange current directory to dir1Use absolute path

















  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    Scroll to Top